Post by sdancer75 » Sat Apr 14, 2018 12:15 am

To complete the upgradte from 2.3.x to 3.0.2 I deleted the opencart/system/storage/modification folder or else I could not install the upgrade.

Iniside admin page I have some dublicate extentions ie Google Analytics (2) and Themes (2)

Extenstions | Themes (2) | Edit Default Store Theme and I get the following error. In OC 2.3 I had installed GlobalThemeLite but I disabled it before the upgrade.

Notice: Undefined index: token in /home/paradox/www/opencart/admin/controller/extension/theme/theme_default.php on line 135
Notice: Undefined index: token in /home/paradox/www/opencart/admin/controller/extension/theme/theme_default.php on line 140
Notice: Undefined index: token in /home/paradox/www/opencart/admin/controller/extension/theme/theme_default.php on line 145
Notice: Undefined index: token in /home/paradox/www/opencart/admin/controller/extension/theme/theme_default.php on line 148
Notice: Undefined index: token in /home/paradox/www/opencart/admin/controller/extension/theme/theme_default.php on line 150

Fatal error: Uncaught exception 'Twig_Error_Loader' with message
'Unable to find template "extension/theme/theme_default.twig"
(looked into: /home/paradox/www/opencart/admin/view/template).' in
/home/paradox/www/opencart/system/library/template/Twig/Loader/Filesystem.php:215 Stack trace:
#0 /home/paradox/www/opencart/system/library/template/Twig/Loader/Filesystem.php(139): Twig_Loader_Filesystem->findTemplate('extension/theme...')
#1 /home/paradox/www/opencart/system/library/template/Twig/Environment.php(312): Twig_Loader_Filesystem->getCacheKey('extension/theme...')
#2 /home/paradox/www/opencart/system/library/template/Twig/Environment.php(378): Twig_Environment->getTemplateClass('extension/theme...', NULL)
#3 /home/paradox/www/opencart/system/library/template/twig.php(33): Twig_Environment->loadTemplate('extension/theme...')
#4 /home/paradox/www/opencart/system/library/template.php(51): Template\Twig->render('extension/theme...', '1')
#5 /home/paradox/www/opencart/system/engine/loader.php(125): Template->render('extensi in /home/paradox/www/opencart/system/library/template/Twig/Loader/Filesystem.php on line 215
Last edited by sdancer75 on Mon Apr 16, 2018 3:36 am, edited 2 times in total.



Sun Nov 27, 2016 11:52 pm

Post by straightlight » Sat Apr 14, 2018 2:32 am

You are using an incompatible theme as you may have launched the upgrade process without knowing if the current theme you are using may be compatible with OC v3.0.2.0 . I would suggest to contact the theme developer or to visit the location where you originally downloaded the theme and see if it is compatible with OC v3.0.2.0 release.

According to the error message, you are encountering the old defined token variable that no longer exist in v3.x releases which has now been replaced with: user_token for the admin.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

Programmer / Opencart Tester

Legendary Member


Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by cyclops12 » Sat Apr 14, 2018 4:16 am

Your upgrade hasnt been done properly as it is still looking for admin/controller/extension/theme/theme_default.php and extension/theme/theme_default.twig yet version files are theme/default.php and theme/default.twig
theme_default is older 2 versions

Expert Member


Sun Sep 27, 2015 1:10 am

Post by sdancer75 » Sun Apr 15, 2018 10:04 pm

.:Steps I followed (Under version 2.3.x I had enabled the ThemeGlobalLite theme) for a successfull upgrade to version 3.0.2:

1) I deleted /system/storage/modification except index.html
2) I deleted default_theme.php from /admin/controller/extension/theme
3) I deleted google_analytics.php from /admin/controller/extension/analytics
4) I deleted also basic_captcha.php & google_captcha.php from /admin/controller/extension/captcha
5) I edited the patch file install/model/upgrade/1009.php and replaced the misspelled 'affiliatee' to 'affiliate' (edit with notepad and search for the misspelled affiliatee word)
6) I run the installation wizard ie
7) After successful install, I deleted cookies, cache etc from my browser
8) Inside admin page I changed the "System|Users|Users Group" and "Administrators Group" in both access/edit permissions to [select all]. Now you can see the "extension" option at the main menu.
9) From Extenstion | Themes [Edit], I selected "default" for the "Theme Directory" and "Status" as "Enabled"
10) Under System and Store Settings save your settings even nothing have been changed !

From now on your OpenCart version 3.0.2 will be working without problems using the default theme. Install a compatible OC theme.

This solution is included to the full OpenCart audio/visual tutorial guide (unfortunately only in Greek Voice/subtitle language. Maybe it supports english subtitles in the near future) at ... /opencart/
Last edited by sdancer75 on Mon Apr 16, 2018 3:36 am, edited 1 time in total.



Sun Nov 27, 2016 11:52 pm

Post by hassan25 » Thu Sep 17, 2020 5:14 pm

i have downloaded a theme from ... e=0&page=4
Now i am getting errors on twig. How to resolve this error?
My OC version is

Fatal error: Uncaught Twig\Error\LoaderError: Template "newcrocus/template/new_elements/product.twig" is not defined in "newcrocus/template/extension/module/featured.twig" at line 51. in C:\xampp\htdocs\upload\system\storage\vendor\twig\twig\src\Loader\ArrayLoader.php:70 Stack trace: #0 C:\xampp\htdocs\upload\system\storage\vendor\twig\twig\src\Environment.php(299): Twig\Loader\ArrayLoader->getCacheKey('newcrocus/templ...') #1 C:\xampp\htdocs\upload\system\storage\vendor\twig\twig\src\Environment.php(381): Twig\Environment->getTemplateClass('newcrocus/templ...') #2 C:\xampp\htdocs\upload\system\storage\vendor\twig\twig\src\Template.php(333): Twig\Environment->loadTemplate('newcrocus/templ...', NULL) #3 C:\xampp\htdocs\upload\system\storage\cache\template\8e\8e5c9e03d41b9c67dbbfdfd20808223d84672524fec4b240d8d454a0e60d71ab.php(281): Twig\Template->loadTemplate('newcrocus/templ...', 'newcrocus/templ...', 51) #4 C:\xampp\htdocs\upload\system\storage\vendor\twig\twig\src\Template.php(405): __TwigTemplate_86129a804e7554ca30cd2a in C:\xampp\htdocs\upload\system\storage\vendor\twig\twig\src\Loader\ArrayLoader.php on line 70



Sat Aug 22, 2020 9:00 pm
Who is online

Users browsing this forum: No registered users and 9 guests