-
Bug
-
Resolution: Deferred
-
Minor
-
None
-
4.1.2
-
MOODLE_401_STABLE
-
MDL-77687-401-get_pre_scss_code-wrong-order -
Just like MDL-77657, get_pre_scss_code is also missing an array_reverse().
In get_pre_scss_code (see https://github.com/moodle/moodle/blob/f3bf17cdfbee0377f5a09fcbbcce7c0367bbe58b/lib/outputlib.php#L1621-L1642), theme ancestry is mixed up, too.
If there are three themes (boost, boost_child and boost_grandchild), each with its own method in prescsscallback, the resulting scss code in theme designer mode contains:
/** Pre-SCSS from theme_boost_child_get_extra_scss **/
/** Pre-SCSS from theme_boost_get_extra_scss **/
/** Pre-SCSS from theme_boost_grandchild_get_extra_scss **/
This should probably rather be:
/** Pre-SCSS from theme_boost_get_extra_scss **/
/** Pre-SCSS from theme_boost_child_get_extra_scss **/
/** Pre-SCSS from theme_boost_grandchild_get_extra_scss **/
The solution for this would probably be to change
foreach ($this->parent_configs as $parent_config) {
to
foreach (array_reverse($this->parent_configs) as $parent_config) {
.
- has a non-specific relationship to
-
MDL-77657 get_extra_scss_code: Order of scss is wrong (missing array_reverse)
-
- Closed
-