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

Manually purging the theme cache after changing theme settings should not be necessary

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0, 2.3.1
    • Fix Version/s: BACKEND
    • Component/s: Themes
    • Labels:
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_23_STABLE

      Description

      If you go to administration > appearance > themes > brick (for example) and change one of the colour settings, that setting does not take effect until you purge the theme cache.

      Clearly, Moodle should be clever enough to purge the brick theme cache when you change one of its settings (but I am not sure if you can implement that within the current admin tree API).

      (Related thread: http://moodle.org/mod/forum/discuss.php?d=164511)

        Gliffy Diagrams

          Activity

          Hide
          vilvoh Xavier Paz added a comment -

          imho, this should be a global parameter that would allow you to enable/disable theme cache, as it's annoying when you are developing new themes and you have to purge cache every time you make a change.

          Show
          vilvoh Xavier Paz added a comment - imho, this should be a global parameter that would allow you to enable/disable theme cache, as it's annoying when you are developing new themes and you have to purge cache every time you make a change.
          Hide
          timhunt Tim Hunt added a comment -

          You mean like setting Theme designer mode: yes under Site administration ► Appearance ► Themes ► Theme settings?

          Show
          timhunt Tim Hunt added a comment - You mean like setting Theme designer mode: yes under Site administration ► Appearance ► Themes ► Theme settings?
          Hide
          vilvoh Xavier Paz added a comment -

          That would be a good solution too, Tim.

          Show
          vilvoh Xavier Paz added a comment - That would be a good solution too, Tim.
          Hide
          timhunt Tim Hunt added a comment -

          What do you mean would be? That option for developers to turn off the theme cache already exists. Did you go and look?

          Show
          timhunt Tim Hunt added a comment - What do you mean would be? That option for developers to turn off the theme cache already exists. Did you go and look?
          Hide
          poltawski Dan Poltawski added a comment -

          I think this still applies, adding affected versions etc.

          Note there is $setting->set_updatedcallback('theme_reset_all_caches'); to achieve this as on themedesignermode

          Show
          poltawski Dan Poltawski added a comment - I think this still applies, adding affected versions etc. Note there is $setting->set_updatedcallback('theme_reset_all_caches'); to achieve this as on themedesignermode
          Hide
          samhemelryk Sam Hemelryk added a comment -

          I am un-assigning myself from this issue as I am not currently working on this and it will give the opportunity for someone else to work on it.

          Just noting that in some respects this is still present, a theme setting must call $setting->set_updatedcallback('theme_reset_all_caches'); itself - any theme setting not calling that won't cause caches to be purged.

          Show
          samhemelryk Sam Hemelryk added a comment - I am un-assigning myself from this issue as I am not currently working on this and it will give the opportunity for someone else to work on it. Just noting that in some respects this is still present, a theme setting must call $setting->set_updatedcallback('theme_reset_all_caches'); itself - any theme setting not calling that won't cause caches to be purged.

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: