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

Display SCSS compile errors in the browser

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.5, 3.9.25, 3.11.18, 4.0.12, 4.1.9, 4.2.6, 4.3.3
    • Themes
    • None
    • MOODLE_311_STABLE, MOODLE_35_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE

      In 3.2-3.4 the built in sass compiler would throw an exception if it couldnt compile, and would allow a theme developer to see what the error was and what line in the browser. However in 3.5 it now calls the function debugging which leaves the browser showing the site without any styling at all and gives very little indication as to what the issue was, its only when checking the error_log that a theme dev will know what and where the scss failed to compile.

       

      I think this is a bug because if the 
      define('NO_DEBUG_DISPLAY', true); line in theme/styles.php is commented out, the debug message still doesn't appear.
       
      The try catch in lib/outputlib.scss on line 1478 was changed in 3.5 from 
       
      } catch (\Leafo\ScssPhp\Exception $e) {
       
      to 
       
      } catch (\Exception $e) {
       

        1. image-2024-07-19-11-55-57-632.png
          image-2024-07-19-11-55-57-632.png
          181 kB
        2. step-1.jpg
          step-1.jpg
          143 kB
        3. step-3.jpg
          step-3.jpg
          185 kB
        4. step-5 (using SASSC).jpg
          step-5 (using SASSC).jpg
          186 kB
        5. step-5 (using ScssPhp).jpg
          step-5 (using ScssPhp).jpg
          272 kB

            Unassigned Unassigned
            callumb Callum Booth
            Votes:
            5 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:

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