gantry / gantry5

:rocket: Next Generation Template / Theme Framework
http://gantry.org
1.04k stars 204 forks source link

Gantry 5.5.3 : blank page with "error" message #2925

Closed fabio42170 closed 3 years ago

fabio42170 commented 3 years ago

Hi ! Joomla 3.10.0 This morning, I tried to update from Gantry 5.4.37 to 5.5.3. First, I updated the package (Gantry ) to 5.5, and everything works fine. When I update Helium, I then get an error message in the frontend (with a white page) The log tells me that:

Twig\Error\RuntimeError thrown with message "An exception has been thrown during the rendering of a template ("ERROR: CSS Compilation on file 'custom.scss' failed on error: `sample` file not found for @import: templates/g5_helium/custom/scss/custom.scss on line 7, at column 1
Call Stack:
#0 import templates/g5_helium/custom/scss/custom.scss (unknown file) on line 2")."

Stacktrace:
#46 Twig\Error\RuntimeError in /home/ulearn/www/joomla/media/gantry5/engines/nucleus/templates/page.html.twig:73
#45 RuntimeException in /home/ulearn/www/joomla/libraries/gantry5/src/classes/Gantry/Component/Stylesheet/ScssCompiler.php:192
#44 ScssPhp\ScssPhp\Exception\CompilerException in /home/ulearn/www/joomla/libraries/gantry5/vendor/scssphp/scssphp/src/Compiler.php:6032
#43 ScssPhp\ScssPhp\Compiler:error in /home/ulearn/www/joomla/libraries/gantry5/vendor/scssphp/scssphp/src/Compiler.php:5801
#42 ScssPhp\ScssPhp\Compiler:findImport in /home/ulearn/www/joomla/libraries/gantry5/src/classes/Gantry/Component/Stylesheet/Scss/Compiler.php:37
#41 Gantry\Component\Stylesheet\Scss\Compiler:findImport in /home/ulearn/www/joomla/libraries/gantry5/vendor/scssphp/scssphp/src/Compiler.php:2648
#40 ScssPhp\ScssPhp\Compiler:compileImport in /home/ulearn/www/joomla/libraries/gantry5/vendor/scssphp/scssphp/src/Compiler.php:2864
#39 ScssPhp\ScssPhp\Compiler:compileChild in /home/ulearn/www/joomla/libraries/gantry5/vendor/scssphp/scssphp/src/Compiler.php:2327
#38 ScssPhp\ScssPhp\Compiler:compileChildrenNoReturn in /home/ulearn/www/joomla/libraries/gantry5/vendor/scssphp/scssphp/src/Compiler.php:5680
#37 ScssPhp\ScssPhp\Compiler:importFile in /home/ulearn/www/joomla/libraries/gantry5/vendor/scssphp/scssphp/src/Compiler.php:2652
#36 ScssPhp\ScssPhp\Compiler:compileImport in /home/ulearn/www/joomla/libraries/gantry5/vendor/scssphp/scssphp/src/Compiler.php:2864
#35 ScssPhp\ScssPhp\Compiler:compileChild in /home/ulearn/www/joomla/libraries/gantry5/vendor/scssphp/scssphp/src/Compiler.php:2327
#34 ScssPhp\ScssPhp\Compiler:compileChildrenNoReturn in /home/ulearn/www/joomla/libraries/gantry5/vendor/scssphp/scssphp/src/Compiler.php:724
#33 ScssPhp\ScssPhp\Compiler:compileRoot in /home/ulearn/www/joomla/libraries/gantry5/vendor/scssphp/scssphp/src/Compiler.php:504
#32 ScssPhp\ScssPhp\Compiler:compileString in /home/ulearn/www/joomla/libraries/gantry5/src/classes/Gantry/Component/Stylesheet/ScssCompiler.php:181
#31 Gantry\Component\Stylesheet\ScssCompiler:compileFile in /home/ulearn/www/joomla/libraries/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:271
#30 Gantry\Framework\Theme:css in /home/ulearn/www/joomla/libraries/gantry5/src/classes/Gantry/Component/Content/Block/HtmlBlock.php:86
#29 Gantry\Component\Content\Block\HtmlBlock:getStyles in /home/ulearn/www/joomla/libraries/gantry5/src/classes/Gantry/Framework/Document.php:130
#28 Gantry\Framework\Document:registerStyles in /home/ulearn/www/joomla/libraries/gantry5/src/classes/Gantry/Framework/Document.php:75
#27 Gantry\Framework\Document:registerAssets in /home/ulearn/www/joomla/libraries/gantry5/src/classes/Gantry/Framework/Base/Platform.php:277
#26 Gantry\Framework\Base\Platform:finalize in /home/ulearn/www/joomla/libraries/gantry5/vendor/twig/twig/src/Template.php:700
#25 Twig\Template:getAttribute in /home/ulearn/www/joomla/cache/gantry5/g5_helium/twig/7f/7fe8c15003429c18414affbf6a857d7326cfb58c8829fe9e5cef998840b46353.php:256
#24 __TwigTemplate_40b7c949e91e626dbdcb4b346b8ba924f6a82984dd9f7c3a3a3bebe858c1ee61:block_page_footer in /home/ulearn/www/joomla/libraries/gantry5/vendor/twig/twig/src/Template.php:214
#23 Twig\Template:displayBlock in /home/ulearn/www/joomla/libraries/gantry5/vendor/twig/twig/src/Template.php:175
#22 Twig\Template:displayParentBlock in /home/ulearn/www/joomla/cache/gantry5/g5_helium/twig/85/855b2b1eb4ca689421e9af902c244456aa5bb9341b847f8c3f173d35c21b3052.php:43
#21 __TwigTemplate_87682fd2a81809c4419f43f3bcf0414219ec12b96d6dd19d57da1ca7ddd02757:block_page_footer in /home/ulearn/www/joomla/libraries/gantry5/vendor/twig/twig/src/Template.php:214
#20 Twig\Template:displayBlock in /home/ulearn/www/joomla/cache/gantry5/g5_helium/twig/7f/7fe8c15003429c18414affbf6a857d7326cfb58c8829fe9e5cef998840b46353.php:150
#19 __TwigTemplate_40b7c949e91e626dbdcb4b346b8ba924f6a82984dd9f7c3a3a3bebe858c1ee61:doDisplay in /home/ulearn/www/joomla/libraries/gantry5/vendor/twig/twig/src/Template.php:453
#18 Twig\Template:displayWithErrorHandling in /home/ulearn/www/joomla/libraries/gantry5/vendor/twig/twig/src/Template.php:420
#17 Twig\Template:display in /home/ulearn/www/joomla/cache/gantry5/g5_helium/twig/85/855b2b1eb4ca689421e9af902c244456aa5bb9341b847f8c3f173d35c21b3052.php:35
#16 __TwigTemplate_87682fd2a81809c4419f43f3bcf0414219ec12b96d6dd19d57da1ca7ddd02757:doDisplay in /home/ulearn/www/joomla/libraries/gantry5/vendor/twig/twig/src/Template.php:453
#15 Twig\Template:displayWithErrorHandling in /home/ulearn/www/joomla/libraries/gantry5/vendor/twig/twig/src/Template.php:420
#14 Twig\Template:display in /home/ulearn/www/joomla/cache/gantry5/g5_helium/twig/a8/a81e6782095178c6615d7436a92cc5d915c5c845ba5131022106d7203ffe175d.php:35
#13 __TwigTemplate_78954c650789a47bf1607a8d715f14a669d8bc4316500b3e9893e3f1733e9ff1:doDisplay in /home/ulearn/www/joomla/libraries/gantry5/vendor/twig/twig/src/Template.php:453
#12 Twig\Template:displayWithErrorHandling in /home/ulearn/www/joomla/libraries/gantry5/vendor/twig/twig/src/Template.php:420
#11 Twig\Template:display in /home/ulearn/www/joomla/libraries/gantry5/vendor/twig/twig/src/Template.php:432
#10 Twig\Template:render in /home/ulearn/www/joomla/libraries/gantry5/vendor/twig/twig/src/TemplateWrapper.php:47
#9 Twig\TemplateWrapper:render in /home/ulearn/www/joomla/libraries/gantry5/vendor/twig/twig/src/Environment.php:384
#8 Twig\Environment:render in /home/ulearn/www/joomla/libraries/gantry5/src/classes/Gantry/Component/Theme/AbstractTheme.php:175
#7 Gantry\Component\Theme\AbstractTheme:render in /home/ulearn/www/joomla/templates/g5_helium/offline.php:42
#6 require in /home/ulearn/www/joomla/libraries/src/Document/HtmlDocument.php:668
#5 Joomla\CMS\Document\HtmlDocument:_loadTemplate in /home/ulearn/www/joomla/libraries/src/Document/HtmlDocument.php:730
#4 Joomla\CMS\Document\HtmlDocument:_fetchTemplate in /home/ulearn/www/joomla/libraries/src/Document/HtmlDocument.php:545
#3 Joomla\CMS\Document\HtmlDocument:parse in /home/ulearn/www/joomla/libraries/src/Application/CMSApplication.php:1126
#2 Joomla\CMS\Application\CMSApplication:render in /home/ulearn/www/joomla/libraries/src/Application/SiteApplication.php:778
#1 Joomla\CMS\Application\SiteApplication:render in /home/ulearn/www/joomla/libraries/src/Application/CMSApplication.php:231
#0 Joomla\CMS\Application\CMSApplication:execute in /home/ulearn/www/joomla/index.php:49

On line 7 of the custom.scss file , I read : @import "sample"; It seems to be the faulty line.

What am I supposed to do ? Thanks for your help ! Fabio

fabio42170 commented 3 years ago

Ok, well, I sort of understood that the @import "sample"; line calls forth a sample particle. When the new Gantry package was updated, it erased the "sample.html.twig" and "sample.yaml" files. I decided to restore these two files in the particles folder but in vain. The sample particle seems to be ignored. For the moment, I commented the line causing the error until I can find out why I needed this line in my custom.scss file as it looks like my site works fine without it. If anyone has any idea about it, you're most welcome ! Fabio

mahagr commented 3 years ago

Where (as a path) did you have the sample files? Joomla shouldn't remove any files in the template folder, so I'm wondering why the files went missing. I also cannot see sample.scss anywhere in the helium package.

mahagr commented 3 years ago

Oh, try clearing cache from Gantry admin and then recompiling the SCSS files.

fabio42170 commented 3 years ago

Thanks for answering. Well, I'm not going to roll back and try again reinstalling the way I did before just to recompile the file. To answer your question, the sample.yaml (and not sample.scss) file was something I imported from another template (from the Hydrogen template) a long time ago to be able to benefit a feature (can't remember which one 🤯) which was in the Hydrogen template and not in the Helium one. This is the reason why I do not need to recompile as my website seems to be working without this.

Thanks again for your eye anyway !

mahagr commented 3 years ago

I didn't mention anything about reinstalling. Just going to admin and clicking 2 buttons in there. :)

PS. CI (or the next) version of Gantry should fix the issue where files cannot be found even if they are there.

fabio42170 commented 3 years ago

Yep, I got it ! What I meant is I did not need to recompile as I commented the line to prevent the custom.scss file from looking for the missing yaml file. Great to know such things will be likely not to happen in the next version !