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

SCSS theme setting validation different when using $CFG->pathtosassc

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.6
    • Fix Version/s: None
    • Component/s: HTML and CSS, Themes
    • Labels:
    • Affected Branches:
      MOODLE_36_STABLE

      Description

      The Boost theme has an admin setting class that allow raw SCSS to be entered and validated.

      The validate function in lib/adminlib.php for this class checks if the syntax complies, but ignores warnings about missing variables, because the variable may be defined somewhere. outside the text entry box within the theme files e.g.

      $link-color: $sucess;

      Would set one variable to another variable already set by Boost.

      If you then set $CFG->pathtosassc to use a c library to do the SCSS compliing the error handling changes. Now any error gets thrown as a "coding error" rather than either a validation error in the form, or for missing variables being ignored.

      This different kind of error doesn't get caught by the validation routine, and it doesn't suppress missing variable errors in the same way. Both errors seem to return the same error code value of 1 from the command line version so telling them apart might involve reading the text of the error message.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bawjaws David Scotson
                Participants:
                Component watchers:
                Amy Groshek, David Scotson, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: