theme looks diffrent in theme designermode

theme looks diffrent in theme designermode

by Guido Hornig -
Number of replies: 4
Picture of Plugin developers

I am changeing themes since moodle 1.7.  With 2.3, I do not understand why my theme looks diffrent with theme designermode switched on.

Yes: I purged the cache, in designer mode on and off

Yes: I deleted the cache in the browser. in designer mode on and off

Yes: I tried with experimental CSS optimisation on and off

Some changes in the decaf/child theme are completely ignored when themedesignermode is off.

Firebug shows nothing from my changes. If I activate themedesignermode, its all there.

Please give me a hint.

 

Average of ratings: -
In reply to Guido Hornig

Re: theme looks diffrent in theme designermode

by Mary Evans -

It's very hard to find a sollution when you don't say what changes you are making.

Have you checked you CSS in the W3C Validator?

http://jigsaw.w3.org/css-validator/#validate_by_upload

This lets you know if there are some errors that is preventing your theme from working.

When theme designer Mode is ON then there is NO 'theme cache'. There is Javascript cache and also javascrip, html, and lang caches in your moodledata folder.

Purging all caches usually fixes everything.

So...

  1. make sure the files (css or php) are the correct files for the theme you are fixing
  2. make sure you save them each time before you test your theme
  3. always refresh your screen using Ctrl + F5 to "FORCE" all images to reset.
  4. when you have the theme working as you want it to work, and have tested it in other browsers, then you can turn off theme designer mode.
  5. If the theme does not look right, after you turned off TDM, then do Purge all caches from Site Administation > Development > Purge all caches twice and refresh screen each time.

If this does not produce any results then please feel free to report it in Moodle Tracker.

Thanks

Mary

In reply to Guido Hornig

Re: theme looks diffrent in theme designermode

by Mauno Korpelainen -

I have seen 3 similar posts recently and one possible reason for this is that site (server) is using apache module mod_pagespeed for optimizing web pages and resources - the bad thing is that moodle is already optimizing the content with yui combo scripts (when theme designer mode is not enabkled) and this "double-optimization" breaks the yui html tags for css. See for example

http://moodle.org/mod/forum/discuss.php?d=212441#p926528


The solution is to uninstall mod_pagespeed or ask your host to re-configure your site to not use mod_pagespeed.

In reply to Guido Hornig

Re: theme looks diffrent in theme designermode

by Kimber Warden -

I had this problem recently too, and it took me a while to figure it out. In my case, and in the cases of several other posts I've seen, the issue was a bit of CSS code that Moodle didn't like. It was valid CSS, but Moodle can be picky sometimes. It's more forgiving in designer mode, which is why your CSS behaves correctly in designer mode but not in regular mode.

Try these things:

1. If you can, figure out which CSS sheet isn't loading. If you're very thorough in your testing, you can even figure out at what point the sheet stops loading. Moodle will load the sheet up until it encounters the error. Fix it and you're good to go.

2. If you can't find the problem, run all of your CSS through the W3C validator (http://jigsaw.w3.org/css-validator/) If there are any outright errors in your code, hopefully you'll find them then.

3. Eliminate any CSS shorthand. For example, instead of

border-bottom: 1px solid #E3E3E3; try

border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #E3E3E3;


HTH,

Kimber

(Edited by Mary Evans - original submission Monday, 1 October 2012, 4:07 PM) Just added px to make border-width: 1px; as it was missing. smile

Average of ratings: Useful (2)
In reply to Kimber Warden

Re: theme looks diffrent in theme designermode

by Mark Aberdour -

I had this issue just from switching between themes in a standard Moodle 2.5 with no custom theme work at all. 

Navigate to Home / Site administration / Server / HTTP and set Use slash arguments to OFF

This fixed the problem.

 

Average of ratings: Useful (1)