Moodle
  1. Moodle
  2. MDL-32958

CORE themes look different with "Theme designer mode" ON and OFF

    Details

    • Testing Instructions:
      Hide

      In FW, ask for a front page showing combo list.
      Create a category structure as the one I posted in http://moodle.org/mod/forum/discuss.php?d=202469. Check the theme with "Theme designer mode" ON and OFF. They shouldn't be different.

      Show
      In FW, ask for a front page showing combo list. Create a category structure as the one I posted in http://moodle.org/mod/forum/discuss.php?d=202469 . Check the theme with "Theme designer mode" ON and OFF. They shouldn't be different.
    • Affected Branches:
      MOODLE_23_STABLE
    • Rank:
      40075

      Description

      Description is available in http://moodle.org/mod/forum/discuss.php?d=202469
      Afterburner too is suffering something similar too. Se this discussion: https://moodle.org/mod/forum/discuss.php?d=218762

        Issue Links

          Activity

          Hide
          Daniele Cordella added a comment -

          Mary, I asked for your review because you are, IMO, the more reliable person with themes.
          The issue is really weird.
          I did not know it could be possible that a theme can look different with and without "Theme designer mode" and even the fix was not simple at all because now it works and now it doesn't.
          Please have a detailed check. Thanks in advance.

          Show
          Daniele Cordella added a comment - Mary, I asked for your review because you are, IMO, the more reliable person with themes. The issue is really weird. I did not know it could be possible that a theme can look different with and without "Theme designer mode" and even the fix was not simple at all because now it works and now it doesn't. Please have a detailed check. Thanks in advance.
          Hide
          Mary Evans added a comment -

          Hi, I'll check it out...but I must admit I don't ever recall seeing anything different when TDM is ON or OFF...but will check for you.

          Are sure this is not the MAC related problem again?

          Show
          Mary Evans added a comment - Hi, I'll check it out...but I must admit I don't ever recall seeing anything different when TDM is ON or OFF...but will check for you. Are sure this is not the MAC related problem again?
          Hide
          Mary Evans added a comment -

          I can find nothing wrong Daniele. It must be something wrong with your Moodle setup.

          Have you checked to see if you have custom CSS in Formal White's settings page?
          Have you added any new mod plugins, blocks or course formats? Added anything else that uses Javascript or CSS?

          Show
          Mary Evans added a comment - I can find nothing wrong Daniele. It must be something wrong with your Moodle setup. Have you checked to see if you have custom CSS in Formal White's settings page? Have you added any new mod plugins, blocks or course formats? Added anything else that uses Javascript or CSS?
          Hide
          Daniele Cordella added a comment -

          Ciao Mary.
          Yes I have some custom css in Formal White's settings page but they are too silly.
          I have some growing modules that I am developing and I am going to check for them but...
          as you can see in http://moodle.org/mod/forum/discuss.php?d=202469 I am not the only one affected by this issue.

          Show
          Daniele Cordella added a comment - Ciao Mary. Yes I have some custom css in Formal White's settings page but they are too silly. I have some growing modules that I am developing and I am going to check for them but... as you can see in http://moodle.org/mod/forum/discuss.php?d=202469 I am not the only one affected by this issue.
          Hide
          Mary Evans added a comment - - edited

          Daniele,

          This may not be relevant but it is important.

          I am wondering if the order of the style sheets are correct, and also more importantly in the way they are written.
          Read: http://learn.open.ac.uk/mod/oublog/view.php?user=11&tag=argh

          $THEME->sheets = array('frame'     ,'menu', 'course',
                                 'pagelayout','core', 'calendar',
                                 'tabs'      ,'quiz', 'forum',
                                 'block'     ,'formal_white');

          These should NOT be spaced like you have done, they should be in a list like so...from your list I get this...

          $THEME->sheets = array(
              'frame' ,
              'menu',
              'course',
              'pagelayout',
              'core',
              'calendar',
              'tabs',
              'quiz',
              'forum',
              'block',
              'formal_white'
          );
          

          But are they in the correct order? Shouldn't pagelayout be at the top or just below frame, and blocks be above course?

          I am still testing this again as Formal White is behaving really oddly in the latest Moodle 2.3 Alpha

          Show
          Mary Evans added a comment - - edited Daniele, This may not be relevant but it is important. I am wondering if the order of the style sheets are correct, and also more importantly in the way they are written. Read: http://learn.open.ac.uk/mod/oublog/view.php?user=11&tag=argh $THEME->sheets = array('frame' ,'menu', 'course', 'pagelayout','core', 'calendar', 'tabs' ,'quiz', 'forum', 'block' ,'formal_white'); These should NOT be spaced like you have done, they should be in a list like so...from your list I get this... $THEME->sheets = array( 'frame' , 'menu', 'course', 'pagelayout', 'core', 'calendar', 'tabs', 'quiz', 'forum', 'block', 'formal_white' ); But are they in the correct order? Shouldn't pagelayout be at the top or just below frame, and blocks be above course? I am still testing this again as Formal White is behaving really oddly in the latest Moodle 2.3 Alpha
          Hide
          Daniele Cordella added a comment -

          Mary,
          in http://learn.open.ac.uk/mod/oublog/view.php?user=11&tag=argh Sam is merely talking about coding style guidelines. They does not affect content at all. It is as if I change the font of a text. It can be better to see or worst but the content doesn't change.

          Show
          Daniele Cordella added a comment - Mary, in http://learn.open.ac.uk/mod/oublog/view.php?user=11&tag=argh Sam is merely talking about coding style guidelines. They does not affect content at all. It is as if I change the font of a text. It can be better to see or worst but the content doesn't change.
          Hide
          Mary Evans added a comment -

          I just mentioned that page as a comparison with the code you have written for the stylesheets array. However, my main concern is about the ORDER of the actual list of stylesheets. It is important that you get the cascade right, otherwise some CSS rules can be over-ridden from another stylesheet.

          I am trying to rule out possibilities for the change from TDM=ON and TDM=Off. The cascade in the CSS array is left to right, so in your list course.css comes before pagelayout.css yes? I just think this is wrong, as the layout should come first, like in Base theme config.php.

          What I am trying to say is that your course.css can be over-ridden by pagelayout.css and then by core.css because of the order of the list as you have it now. In my humble opinion I think course.css should come after both pagelayout and core.

          For example:

          $THEME->sheets = array(
              'pagelayout',
              'frame' ,
              'core',
              'tabs',
              'block',
              'menu',
              'calendar',
              'course', 
              'quiz',
              'forum',
              'formal_white'
          );

          I am finding problems with Formal White(Colortrend) but NOT Formal White (Normal) if that helps, so it looks like the problems are in the latest changes.

          I'm planning on doing some more testing this evening and over the weekend. So I will let you know if I find anything odd.

          Show
          Mary Evans added a comment - I just mentioned that page as a comparison with the code you have written for the stylesheets array. However, my main concern is about the ORDER of the actual list of stylesheets. It is important that you get the cascade right, otherwise some CSS rules can be over-ridden from another stylesheet. I am trying to rule out possibilities for the change from TDM=ON and TDM=Off. The cascade in the CSS array is left to right, so in your list course.css comes before pagelayout.css yes? I just think this is wrong, as the layout should come first, like in Base theme config.php. What I am trying to say is that your course.css can be over-ridden by pagelayout.css and then by core.css because of the order of the list as you have it now. In my humble opinion I think course.css should come after both pagelayout and core. For example: $THEME->sheets = array( 'pagelayout', 'frame' , 'core', 'tabs', 'block', 'menu', 'calendar', 'course', 'quiz', 'forum', 'formal_white' ); I am finding problems with Formal White(Colortrend) but NOT Formal White (Normal) if that helps, so it looks like the problems are in the latest changes. I'm planning on doing some more testing this evening and over the weekend. So I will let you know if I find anything odd.
          Hide
          Daniele Cordella added a comment - - edited

          Thanks Mary.
          The order of style sheets is really important for what you wrote.
          In spite of this... if this order was fine yesterday, why it should be wrong today?
          How do you say "Brancolo nel buio"? Google translates it as "I grope in the dark". Is it correct?

          Show
          Daniele Cordella added a comment - - edited Thanks Mary. The order of style sheets is really important for what you wrote. In spite of this... if this order was fine yesterday, why it should be wrong today? How do you say "Brancolo nel buio"? Google translates it as "I grope in the dark". Is it correct?
          Hide
          Mary Evans added a comment -

          "Brancolo nel buio" = "I'm groping in the dark"

          Sorry for making you think that the CSS is causing the problem, it isn't, at least I have not proved that yet, but it is a possibility, I was just wanting to draw your attention to the order of the list.

          I have made a copy of your latest version of Formal White which I got from GIT and converted it into a theme called 'colortrend'.

          When I first tried it on Friday, it worked well, at least I think it did, although there was NO background image. Is the background supposed to change colour too?

          Then I got distracted with the Combo view of the coures/category in the frontpage, this displayed the problem you described with TDM ON?OFF probelm.

          So yesterday I tried again with New Moodle 2.3 upgrade and two themes Formal White and Colortrend

          I am still testing

          Show
          Mary Evans added a comment - "Brancolo nel buio" = "I'm groping in the dark" Sorry for making you think that the CSS is causing the problem, it isn't, at least I have not proved that yet, but it is a possibility, I was just wanting to draw your attention to the order of the list. I have made a copy of your latest version of Formal White which I got from GIT and converted it into a theme called 'colortrend'. When I first tried it on Friday, it worked well, at least I think it did, although there was NO background image. Is the background supposed to change colour too? Then I got distracted with the Combo view of the coures/category in the frontpage, this displayed the problem you described with TDM ON?OFF probelm. So yesterday I tried again with New Moodle 2.3 upgrade and two themes Formal White and Colortrend I am still testing
          Hide
          Daniele Cordella added a comment - - edited

          Thanks Mary. I'm groping in the dark with the ON?OFF problem.
          The first solution I posted in https://github.com/kordan/moodle/compare/master...MDL-32958_master seems to work fine here locally.

          Show
          Daniele Cordella added a comment - - edited Thanks Mary. I'm groping in the dark with the ON?OFF problem. The first solution I posted in https://github.com/kordan/moodle/compare/master...MDL-32958_master seems to work fine here locally.
          Hide
          Mary Evans added a comment - - edited

          Ciao Daniele,

          I'm having some fun with the TDM=ON/OFF problem with another theme now.
          This evening I cam back to do more testing on (FW)colortrend theme, which is runing on Moodle 2.3 Alpha.

          But before I started testing I wanted to test another problem with Aardvark Post-IT for someone on the Themes' forum. So with with Theme designer OFF and Colortrend active I added ?theme=aardvark_postit in the URL. Ardvark Post-IT appeared but for some reason did not have the background graphic image accociated with that theme. So I looked in Firebug and found it was looking for the post-it image in the theme/colortrend/pix/images ??? Why???

          This means that if Theme designer mode is off in a production site, any session theme will look for and use all images from the MAIN theme if they exist, which is not desirable as Course themes fall in this category too. Very ODD.

          So perhaps what you need to look at is how Theme designer more is coded as this could be causing the problems in your theme.

          Because we tend to use TDM=ON all the time we miss all the things that others are experiencing. There has been a lot of this behaviour reported in the Themes forum, but we just say Purge caches...but Teachers and Students cannot Purge caches to fix a theme...can they?

          Show
          Mary Evans added a comment - - edited Ciao Daniele, I'm having some fun with the TDM=ON/OFF problem with another theme now. This evening I cam back to do more testing on (FW)colortrend theme, which is runing on Moodle 2.3 Alpha. But before I started testing I wanted to test another problem with Aardvark Post-IT for someone on the Themes' forum. So with with Theme designer OFF and Colortrend active I added ?theme=aardvark_postit in the URL. Ardvark Post-IT appeared but for some reason did not have the background graphic image accociated with that theme. So I looked in Firebug and found it was looking for the post-it image in the theme/colortrend/pix/images ??? Why??? This means that if Theme designer mode is off in a production site, any session theme will look for and use all images from the MAIN theme if they exist, which is not desirable as Course themes fall in this category too. Very ODD. So perhaps what you need to look at is how Theme designer more is coded as this could be causing the problems in your theme. Because we tend to use TDM=ON all the time we miss all the things that others are experiencing. There has been a lot of this behaviour reported in the Themes forum, but we just say Purge caches...but Teachers and Students cannot Purge caches to fix a theme...can they?
          Hide
          Daniele Cordella added a comment -

          ha ha! Coool. So we are landing on the same understanding. I also think it may be a problem with the core. I think we should add as watcher here core developers responsible for these details. Any idea about? Sam H.?

          Show
          Daniele Cordella added a comment - ha ha! Coool. So we are landing on the same understanding. I also think it may be a problem with the core. I think we should add as watcher here core developers responsible for these details. Any idea about? Sam H.?
          Hide
          Martin Dougiamas added a comment -

          Is it possibly because of the config setting enablecssoptimiser ?

          Show
          Martin Dougiamas added a comment - Is it possibly because of the config setting enablecssoptimiser ?
          Hide
          Daniele Cordella added a comment -

          Thanks Martin for the suggestion.
          I tried to disable enablecssoptimiser in admin but the issue is still alive!

          Show
          Daniele Cordella added a comment - Thanks Martin for the suggestion. I tried to disable enablecssoptimiser in admin but the issue is still alive!
          Hide
          Daniele Cordella added a comment -

          I made a test.
          I tried the receipt to reproduce the issue on a fresh installation (thanks MD) and I found that the issue left

          Show
          Daniele Cordella added a comment - I made a test. I tried the receipt to reproduce the issue on a fresh installation (thanks MD) and I found that the issue left
          Hide
          Daniele Cordella added a comment -

          So it seems the problem should be attributed to the routine to clean the cache

          Show
          Daniele Cordella added a comment - So it seems the problem should be attributed to the routine to clean the cache
          Hide
          Gus Hagelberg added a comment -

          Is this issue still being worked on. I have modified the leatherbound theme and am also getting incorrect rendering when "theme designer mode" is off.
          I'm running the latest release of 2.3.

          Show
          Gus Hagelberg added a comment - Is this issue still being worked on. I have modified the leatherbound theme and am also getting incorrect rendering when "theme designer mode" is off. I'm running the latest release of 2.3.
          Hide
          Lael... added a comment -

          I'm actually having this issue currently with creatif (haven't tested others extensively). With Theme designer mode on - everything works nicely. With it off - topic headings are not styled, and a number of layout quirks show up - eg: content moving to the bottom of where blocks are. using Moodle2.3.1 latest.

          Show
          Lael... added a comment - I'm actually having this issue currently with creatif (haven't tested others extensively). With Theme designer mode on - everything works nicely. With it off - topic headings are not styled, and a number of layout quirks show up - eg: content moving to the bottom of where blocks are. using Moodle2.3.1 latest.
          Hide
          Dan Poltawski added a comment -

          Sending all 'waiting for peer review' issues to integration before freeze, as agreed in Integrators Meeting 19/10/12. We are doing this to ensure any 'integratable issues' will not got missed before freeze..

          Show
          Dan Poltawski added a comment - Sending all 'waiting for peer review' issues to integration before freeze, as agreed in Integrators Meeting 19/10/12. We are doing this to ensure any 'integratable issues' will not got missed before freeze..
          Hide
          Daniele Cordella added a comment - - edited

          I am not sure if this issue has still sense. I forget about it because it was confirmed and unconfirmed by users and I am not sure at all the provided code really fixes the issue, if it ever was true!

          Show
          Daniele Cordella added a comment - - edited I am not sure if this issue has still sense. I forget about it because it was confirmed and unconfirmed by users and I am not sure at all the provided code really fixes the issue, if it ever was true!
          Hide
          Mary Evans added a comment -

          I don't know why the put this in integration as it isn't even Triaged!!!

          Like you say Danielle it was not resolved, one way of the other.

          Show
          Mary Evans added a comment - I don't know why the put this in integration as it isn't even Triaged!!! Like you say Danielle it was not resolved, one way of the other.
          Hide
          Mary Evans added a comment -

          I'm reopening this as it is should not have been a candidate for Integration Review.

          Show
          Mary Evans added a comment - I'm reopening this as it is should not have been a candidate for Integration Review.
          Hide
          Mary Evans added a comment -

          Daniele, as you will see I have taken this out of Integration Review, and re-opened this issue. I have also removed the links to your github branches as this has been static for a while and out of date anyway.

          If there is an issue with Theme Design Mode then this needs fixing in CORE and not in the theme, as this defeats the object of having such a feature when building themes if you have to style it so it looks right when ON and OFF!

          However, if a theme visibly changes when Theme Designer Mode is switched OFF then there I would say there is is something dreadfully wrong with the theme.

          Show
          Mary Evans added a comment - Daniele, as you will see I have taken this out of Integration Review, and re-opened this issue. I have also removed the links to your github branches as this has been static for a while and out of date anyway. If there is an issue with Theme Design Mode then this needs fixing in CORE and not in the theme, as this defeats the object of having such a feature when building themes if you have to style it so it looks right when ON and OFF! However, if a theme visibly changes when Theme Designer Mode is switched OFF then there I would say there is is something dreadfully wrong with the theme.
          Hide
          CiBoT added a comment -

          Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.

          Show
          CiBoT added a comment - Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.
          Hide
          Mary Evans added a comment - - edited

          Daniele,

          I think we should get this sent to Moodle.com because I suspect there is a problem with Theme Designer Mode. Afterburner and other CORE themes are affected too mainly do to the cache being lost for the current images. This is especially true when theme, which use Custom Settings, are set as Course themes. If Theme Designer Mode is on and then turned off the changes are lost and things like Logos go missing.

          It is very frustrating.

          Show
          Mary Evans added a comment - - edited Daniele, I think we should get this sent to Moodle.com because I suspect there is a problem with Theme Designer Mode. Afterburner and other CORE themes are affected too mainly do to the cache being lost for the current images. This is especially true when theme, which use Custom Settings, are set as Course themes. If Theme Designer Mode is on and then turned off the changes are lost and things like Logos go missing. It is very frustrating.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: