Page 1 of 1

Opencart Update 3.0.2.0 to 3.0.3.8 Twig error

Posted: Fri Sep 10, 2021 10:08 pm
by nongetjie
Hi,

I have an error updating from 3.0.2.0 to 3.0.3.8

Code: Select all

Uncaught TypeError: Argument 1 passed to Twig\TwigFunction::__construct() must be of the type string, array given, called in /vagrant/public/system/library/template/Twig/Function/Function.php on line 32 and defined in /vagrant/public/storage/vendor/twig/twig/src/TwigFunction.php:40
Stack trace:
#0 /vagrant/public/system/library/template/Twig/Function/Function.php(32): Twig\TwigFunction->__construct(Array)
#1 /vagrant/public/storage/modification/system/library/template/twig.php(46): Twig_Function_Function->__construct(Object(Closure))
#2 /vagrant/public/storage/modification/system/library/template.php(71): Template\Twig->render('journal3/css', '0')
#3 /vagrant/public/storage/modification/system/engine/loader.php(144): Template->render('journal3/css', '0')
#4 /vagrant/public/catalog/controller/journal3/settings.php(155): Loader->view('journal3/css', Array)
#5 /vagrant/public/storage/modification/system/engine/action.php(79): ControllerJournal3Settings->index(Array)
PHP 7.3
Journal 3 theme

Couldn't find anything on Google or the forum. Any ideas?

Re: Opencart Update 3.0.2.0 to 3.0.3.8 Twig error

Posted: Fri Sep 10, 2021 10:13 pm
by straightlight
Something went wrong during the upgrade. Revert changes from your backups. You could either use the export / import tool from the Marketplace and install a fresh version of OC v3.0.3.8 and re-import the needed data or to create a new service request in the Commercial Support section of the forum to get this done as a custom job.

Re: Opencart Update 3.0.2.0 to 3.0.3.8 Twig error

Posted: Fri Sep 10, 2021 10:29 pm
by nongetjie
straightlight wrote:
Fri Sep 10, 2021 10:13 pm
Something went wrong during the upgrade. Revert changes from your backups. You could either use the export / import tool from the Marketplace and install a fresh version of OC v3.0.3.8 and re-import the needed data or to create a new service request in the Commercial Support section of the forum to get this done as a custom job.
Thanks for the suggestion, but I have to much modifications to do that I think. With some pointers to the possible issue I can probably fix it.

Re: Opencart Update 3.0.2.0 to 3.0.3.8 Twig error

Posted: Sat Sep 11, 2021 1:58 am
by ADD Creative
Looks like your system/library/template folder has not been updated. There should not be a Twig folder in there, it's been moved to storage/vendor in 3.0.3.8.

Re: Opencart Update 3.0.2.0 to 3.0.3.8 Twig error

Posted: Sat Sep 11, 2021 2:16 am
by JNeuhoff
Also, doing an upgrade with the Journal3 framework most likely won't work. The Journal3 framework is not a standard-compliant OpenCart web theme.