gantry / gantry5

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

SCSS compile error after upgrading to 5.5.17 #3219

Open newjie opened 9 months ago

newjie commented 9 months ago

My 3.10 site has been running well until I upgraded my Gantry from 5.4 to 5.5.17 today. I've also upgraded my template Helium to 5.5.17.

The error message is like

An exception has been thrown during the rendering of a template ("ERROR: CSS Compilation on file 'helium.scss' failed on error: $amount: Expected 40% to be within 0 and 1.: templates/g5_helium/custom/scss/helium/styles/_helium-style.scss on line 28, at column 33 Call Stack: #0 import templates/g5_helium/custom/scss/helium/styles/_helium-style.scss templates/g5_helium/custom/scss/helium.scss on line 29 #1 import templates/g5_helium/custom/scss/helium.scss (unknown file) on line 2").

The line is color: fadeout($white, 40%);

I've checked this file under 5.4 in another website of mine that hasn't been upgraded, the line is the same. So did Gantry 5.5.17 introduce new sass engine so it triggers the error? If yes, how come this hasn't been fixed in the past two months?

newjie commented 9 months ago

Here is the live site.

For testing purpose, I tried to comment out every @import line in helium.scss, now even this line in my custom.scss file trigger an error: @import "nucleus/mixins/breakpoints"

I've also tried both PHP7.4 and PHP8.1, the problem persists.

I have set error reporting to maximum, there is no related error log, these are the last lines I can found:

[Thu Jan 04 07:40:52.793566 2024] [proxy_fcgi:error] [pid 3260904:tid 139921376098048] [remote 74.101.101.106:60493] AH01071: Got error 'PHP message: PHP Deprecated:  Joomla\\Input\\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/vendor/joomla/input/src/Input.php on line 41PHP message: PHP Deprecated:  Return type of Joomla\\Input\\Input::count() should either be compatible with Countable::count(): int, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/sbg/public_html/libraries/vendor/joomla/input/src/Input.php on line 170PHP message: PHP Deprecated:  Joomla\\CMS\\Input\\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/src/Input/Input.php on line 31PHP message: PHP Deprecated:  Joomla\\CMS\\Input\\Cookie implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/src/Input/Cookie.php on line 0PHP message: PHP Deprecated:  str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/sbg/public_html/libraries/src/Uri/Uri.php on line 141', referer: https://glorygospel.tv/administrator/index.php?option=com_config
[Thu Jan 04 07:40:53.251945 2024] [proxy_fcgi:error] [pid 3260904:tid 139921451779840] [remote 74.101.101.106:60493] AH01071: Got error 'PHP message: PHP Deprecated:  Joomla\\Input\\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/vendor/joomla/input/src/Input.php on line 41PHP message: PHP Deprecated:  Return type of Joomla\\Input\\Input::count() should either be compatible with Countable::count(): int, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/sbg/public_html/libraries/vendor/joomla/input/src/Input.php on line 170PHP message: PHP Deprecated:  Joomla\\CMS\\Input\\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/src/Input/Input.php on line 31PHP message: PHP Deprecated:  Joomla\\CMS\\Input\\Cookie implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/src/Input/Cookie.php on line 0PHP message: PHP Deprecated:  str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/sbg/public_html/libraries/src/Uri/Uri.php on line 141', referer: https://glorygospel.tv/administrator/index.php
[Thu Jan 04 07:40:55.577405 2024] [proxy_fcgi:error] [pid 3260904:tid 139921485416192] [remote 74.101.101.106:60493] AH01071: Got error 'PHP message: PHP Deprecated:  Joomla\\Input\\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/vendor/joomla/input/src/Input.php on line 41PHP message: PHP Deprecated:  Return type of Joomla\\Input\\Input::count() should either be compatible with Countable::count(): int, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/sbg/public_html/libraries/vendor/joomla/input/src/Input.php on line 170PHP message: PHP Deprecated:  Joomla\\CMS\\Input\\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/src/Input/Input.php on line 31PHP message: PHP Deprecated:  Joomla\\CMS\\Input\\Cookie implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/src/Input/Cookie.php on line 0PHP message: PHP Deprecated:  str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/sbg/public_html/libraries/src/Uri/Uri.php on line 141', referer: https://glorygospel.tv/administrator/index.php
[Thu Jan 04 07:40:59.344528 2024] [proxy_fcgi:error] [pid 3260904:tid 139921460188928] [remote 74.101.101.106:60493] AH01071: Got error 'PHP message: PHP Deprecated:  Joomla\\Input\\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/vendor/joomla/input/src/Input.php on line 41PHP message: PHP Deprecated:  Return type of Joomla\\Input\\Input::count() should either be compatible with Countable::count(): int, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/sbg/public_html/libraries/vendor/joomla/input/src/Input.php on line 170PHP message: PHP Deprecated:  Joomla\\CMS\\Input\\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/src/Input/Input.php on line 31PHP message: PHP Deprecated:  Joomla\\CMS\\Input\\Cookie implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/src/Input/Cookie.php on line 0PHP message: PHP Deprecated:  str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/sbg/public_html/libraries/src/Uri/Uri.php on line 141', referer: https://glorygospel.tv/administrator/index.php
[Thu Jan 04 07:41:17.326523 2024] [proxy_fcgi:error] [pid 3260904:tid 139921401325312] [remote 74.101.101.106:60504] AH01071: Got error 'PHP message: PHP Deprecated:  Joomla\\Input\\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/vendor/joomla/input/src/Input.php on line 41PHP message: PHP Deprecated:  Return type of Joomla\\Input\\Input::count() should either be compatible with Countable::count(): int, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/sbg/public_html/libraries/vendor/joomla/input/src/Input.php on line 170PHP message: PHP Deprecated:  Joomla\\CMS\\Input\\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/src/Input/Input.php on line 31PHP message: PHP Deprecated:  Joomla\\CMS\\Input\\Cookie implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/sbg/public_html/libraries/src/Input/Cookie.php on line 0'
tramber91 commented 9 months ago

Hi

just replace color: fadeout($white, 40%); by color: fadeout($white, .4);

newjie commented 9 months ago

There are hundreds of files and most of them are using this function. Besides this function, there could be other errors.

tramber91 commented 9 months ago

hundreds of scss files in template custom directory ? it is a joke or something is crazy here only them should be review, and no choice

N8Solutions commented 9 months ago

@newjie I have upgraded a very old custom site using Helium to Gantry v5.5.17 with absolutely no problems. It is also now running Joomla v4.4.1 and PHP v8.1. I would suggest reinstalling both the Gantry 5 framework and the Helium template manually.

If that doesn't work, you should rename your /template/g5_helium/custom/scss/custom.scss to something like custom.bak and retest to see if the compile error still exists. You should also set the Gantry 5 template to Development mode instead of Production to make sure you will be able to see if something else is contributing to the error you are seeing.

hexplor commented 6 months ago

There was a SCSS compiler version bump in that release. All templates are now updated, Helium as well. Maybe you were using old template?