Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Design mode styles not applying View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
Nathoushka - 7/13/2011 9:22:09 AM
   
Design mode styles not applying
I've got some problems since I did modifications on my site. I can't recall after what the styles started not applying but I can't do anything in Design Mode now. Even after I remove all my styles from the site, the Design mode styles aren't applying, so it is not a overwrite problem.

What is happening is that everything in my Design mode (Webparts name, actions, etc.) are not styled anymore. I can't add a webpart or even remove one. It's as if the CSS stopped loading for the Design Mode.

Any idea on what's going on?

Here's a screenshot of the current styles applied on Design mode items:
http://i817.photobucket.com/albums/zz97/SpiritOfTheWinds/bug.png

You'll see that there are really NO styles applied on it.

Thank you.

User avatar
Certified Developer v7
Certified  Developer v7
Nathoushka - 7/13/2011 10:06:31 AM
   
RE:Design mode styles not applying
I'll add another screenshot:
http://i817.photobucket.com/albums/zz97/SpiritOfTheWinds/bug-1.png

I can click on the arrow and configure buttons, but nothing happens if I try to Move, Delete or do another action (of the submenu).

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 7/17/2011 2:52:51 AM
   
RE:Design mode styles not applying
Hello,

This issue is most probably caused by your CSS styles definitions for the live site. They are actually being applied in the Design mode as well so they might interferee with some CMS Desk styles. You need to use tools like Firebug to identify which styles need to be adjusted and then you can override their definitions using the ~App_Themes\Default\DesignMode.css CSS stylesheet. Since this stylesheet is loaded after the live site one, CSS class definitions will be used with higher priority. Alternatively, you can use also the !important directive in this DesignMode.css stylesheet.

Hope this sheds some light.

Best regards
Ondrej Vasil

User avatar
Certified Developer v7
Certified  Developer v7
Nathoushka - 7/18/2011 2:16:05 PM
   
RE:Design mode styles not applying
Unfortunately, I had already done this before posting my message. I do use Firebug for everything and Fiddler. What I noticed is that the DesignMode.css does NOT load.

I haven't touched the App_Themes/Default folder... I was wondering if a conflict or error somewhere could stop it from loading?

User avatar
Certified Developer v7
Certified  Developer v7
Nathoushka - 7/18/2011 2:22:04 PM
   
RE:Design mode styles not applying
Talking about errors, I noticed IE8 gives me errors when I load the page:

- ScriptRessource.axd not found
- __dopostback is undefined
- and another minor error.

This could explain the page does not load correctly. I just noticed the PostBacks do not work, but everything shows up fine. And I think that is what's messing up the DesignMode. Any idea what could cause this problem?

User avatar
Certified Developer v7
Certified  Developer v7
Nathoushka - 7/18/2011 2:46:16 PM
   
RE:Design mode styles not applying
Finally, I managed to solve the problem. Everything is fine now!

For anyone else who has their design mode styles not loading, or ScriptResources.axd & __dopostback not defined, be sure to look at your JS declarations!

My javascript import looked as follow:

<script type="text/javascript" src="../js/main.js" />

But the script tag MUST have a full closing tag as follow:

<script type="text/javascript" src="../js/main.js"></script>

I guess I wasn't at the root of the problem. I am developping in FF and I just noticed today the errors... It was my own inadvertance that made me think the Design Mode was bugged... Sorry for this.