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

    • MOODLE_36_STABLE, MOODLE_403_STABLE
    • 3
    • HQ Team International Sprint 6

      barbararamiro 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 basbrands the error is prevalent on the current master branch.

      To reproduce it:

      1. Build SASSC library following the docs in https://github.com/sass/sassc 
      2. Login as admin.
      3. Go to "Site administration > Development > Experimental settings".
      4. Set "Path to SassC" with the proper path to the sassc binary file built in step #1.
      5. Go to Boost > Advanced Settings and:
        • Enter $moodle-test: #FF00FF; as "Raw initial SCSS"
        • 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. If pathtosassc is removed, the error is not displayed (so this error is only caused when using the SASSC to compile SCSS).

      See attached screenshots.

        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
        5. Screenshot 2023-12-19 at 15.54.47.png
          Screenshot 2023-12-19 at 15.54.47.png
          128 kB
        6. Screenshot 2023-12-19 at 15.55.03.png
          Screenshot 2023-12-19 at 15.55.03.png
          188 kB

            Unassigned Unassigned
            craig@moodle.com Craig R Morton
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.