Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

opencart - twig issue upon emarket theme activation

I am facing this strange issue once i installed "emarket theme" and of course i cleared twig cache and refreshed modifications and activated all permissions from user groups but it's not clear to me why this twig error is showing and i installed the theme twice but no change.

Fatal error: Uncaught TwigErrorLoaderError: Template "extension/soconfig/options_stores.twig" is not defined in "extension/soconfig/soconfig.twig" at line 68. in /home1/genniest/ocartdata/storage/vendor/twig/twig/src/Loader/ArrayLoader.php:70 Stack trace: #0 /home1/genniest/ocartdata/storage/vendor/twig/twig/src/Environment.php(299): TwigLoaderArrayLoader->getCacheKey('extension/socon...') #1 /home1/genniest/ocartdata/storage/vendor/twig/twig/src/Environment.php(381): TwigEnvironment->getTemplateClass('extension/socon...') #2 /home1/genniest/ocartdata/storage/vendor/twig/twig/src/Template.php(333): TwigEnvironment->loadTemplate('extension/socon...', NULL) #3 /home1/genniest/ocartdata/storage/cache/template/30/30f20f91d70c5ca5928f3f2aeda95ebdd7bc3e7320bcf7dbff0ce113184be63b.php(213): TwigTemplate->loadTemplate('extension/socon...', 'extension/socon...', 68) #4 /home1/genniest/ocartdata/storage/vendor/twig/twig/src/Template.php(405): __TwigTemplate_2eb9927c3e6095c1a9edf223e3b350277bc7036e77fce5ce00ab99f91471b0c5->doD in /home1/genniest/ocartdata/storage/vendor/twig/twig/src/Loader/ArrayLoader.php on line 70

enter image description here

And the file options_stores.twig really exists

enter image description here

question from:https://stackoverflow.com/questions/65937515/twig-issue-upon-emarket-theme-activation

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Well finally i found the solution i wanted to share for everyone to know .. the problem was because of using {% include %} inside theme files and it looks like there is a new update in twig library that was not handled by opencart.

The problem is explained here

And the solution found here

I hope this can help anyone face this problem.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...