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

csspostprocess is not being run for parent theme's leaving unprocessed CSS settings for themes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.1
    • Fix Version/s: None
    • Component/s: Themes
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      When creating a new theme that extends another theme that defines a csspostprocess function the csspostprocess for the extended theme isn't run.
      This can lead to unprocessed theme settings within the completed CSS.

      You can easily reproduce this in the following manor:

      1. Make sure allowthemechangeonurl is turned on
      2. Create a new directory theme/test
      3. Create a new file theme/test/config.php
      4. Into config.php type the following: "<?php $THEME->name='config';$THEME->parents=array('arialist','canvas','base');
      5. In you browser visit example.local/?theme=arialist
      6. Then visit example.local/?theme=test

      You should notice colour changes and the like, although the test theme is actually just arialist.

      Now I don't know necessarily whether this is a bug we should fix or whether we should just advise people that is they override a theme, or several theme's for that matter they should call each theme's csspostprocess method from within their new themes own csspostprocess method.

      I'd be very keen to see what people think of this, I'll add a couple of watchers here and then post in the theme's forum to see what people think.

      Cheers
      Sam

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                4 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: