Page 1 of 1

Opencart Version 3.0.2.0:- Cannot redeclare class Composer in system/library/template/Twig/Autoloader.php

Posted: Mon Oct 15, 2018 8:55 pm
by balwant
Opencart Version 3.0.2.0:-

i was working on Opencart Version 3.0.2.0 site, after doing some modifation in header.twig file (i have added this code in header.twig file, locaiton => http://prntscr.com/l5n71s )

but after adding this code I am getting this error = >http://prntscr.com/l5n7if.

I reverted back my changes, even i restore this file with an old backup file that i downloaded just before to start changes and after that clear and refresh cache from admin section => https://prnt.sc/l5n7x8, but still, I am getting the same error, I don't know how to fix this error. please help me to fix this issue

Thanks :

Re: Opencart Version 3.0.2.0:- Cannot redeclare class Composer in system/library/template/Twig/Autoloader.php

Posted: Tue Oct 16, 2018 5:49 pm
by paulfeakins
balwant wrote:
Mon Oct 15, 2018 8:55 pm
even i restore this file with an old backup file
But this is stored in the database isn't it?

Re: Opencart Version 3.0.2.0:- Cannot redeclare class Composer in system/library/template/Twig/Autoloader.php

Posted: Tue Oct 16, 2018 6:06 pm
by balwant
NO, this is not stored in the database, the issue is fixed now. it just because of adding \Composer::register(); code instead of \Twig_Autoloader::register(); in twig.php file

Thanks