Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65073

Raw initial SCSS and Raw SCSS are compiled individually and errors are silently dropped

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_36_STABLE

      Description

      Barbara Ramiro reported an issue where in the Boost Advanced Settings referencing a SASS variable in the Raw SCSS would produce an error.

      The error was initially encountered on a MoodleCloud site, however I verified with Bas Brands the error is prevalent on the current master branch.

      To reproduce I went to Boost > Advanced Settings and entered $moodle-test: #FF00FF; as "Raw initial SCSS" then referenced that variable in the "Raw SCSS" section with:

      .crmpicco {
         border-color: $moodle-test;
      }
      

      Saving this form produced the error:

      Coding error detected, it must be fixed by a programmer: Error: Undefined variable: "$moodle-test". on line 2 of stdin >> border-colour: $moodle-test; ---------------^

      More information about this error
      Debug info:
      Error code: codingerror
      Stack trace:

      line 138 of /lib/classes/scss.php: coding_exception thrown
      line 10574 of /lib/adminlib.php: call to core_scss->compile()
      line 2242 of /lib/adminlib.php: call to admin_setting_scsscode->validate()
      line 8187 of /lib/adminlib.php: call to admin_setting_configtext->write_setting()
      line 44 of /admin/settings.php: call to admin_write_settings()

      The pathtosassc config setting is set to /usr/local/bin/sassc on Cloud.

      See attached screenshots.

        Attachments

        1. 2019-03-14 16.36.21.jpg
          2019-03-14 16.36.21.jpg
          62 kB
        2. 2019-03-14 16.47.20.jpg
          2019-03-14 16.47.20.jpg
          79 kB
        3. 2019-03-14 16.47.36.jpg
          2019-03-14 16.47.36.jpg
          64 kB
        4. screenshot-1.png
          screenshot-1.png
          33 kB

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: