|
|
Rank: Aficionado
Joined: 7/30/2006 Posts: 105
|
I have upgraded to v. 3.0.3 from v. 2.1.6 and suddenly the layout was broken...
It seems like somehow the templates were altered. Somehow the broken layout looks very familiar... I think it's an old version that I had fixed a long time ago. However, my new macros are still there... any idea what could be causing this?
|
|
Rank: Aficionado
Joined: 7/30/2006 Posts: 105
|
Of course I have created backup copies of both the database and the webspace... where can I find the old templates for comparison and/or restore?
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,696 Location: KY, USA
|
Hi, Marvin, I haven't had umbraco lose any templates during an upgrade before. But v3 does do something differently than v2 that could be causing the problem. Look at the HTML source (from your browser) of a page that no longer renders correctly under v3. Look for a div that closes itself. That will break your layout. In v2, an empty div would generate this code in your html: In v3, an empty div generates this code in your html: While the <div /> is valid xml, most browsers don't like it and it breaks your css layout. Let us know what you find out. cheers, doug.
MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,696 Location: KY, USA
|
Well, that didn't format properly... let me try again... In v2, an empty div would generate this code in your html: <div></div> In v3, an empty div generates this code in your html: <div /> cheers, doug.
MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
|
|
Rank: Aficionado
Joined: 7/30/2006 Posts: 105
|
Indeed! :) I was misled my the designer telling me that there were five instead of three stylesheets etc.
Now how can I get rid of those empty div's?
|
|
Rank: Aficionado
Joined: 7/30/2006 Posts: 105
|
I had an <div></div> in my XSLT... I've changed it to <div> </div>. This renders as <div> </div> and the layout works again... Is there a way to get rid of the space?
|
|
 Rank: Fanatic
Joined: 11/24/2006 Posts: 322 Location: Stockholm, Sweden
|
GroennDemon wrote:I had an <div></div> in my XSLT... I've changed it to <div> </div>. This renders as <div> </div> and the layout works again... Is there a way to get rid of the space? Adding a (non-breaking space) between two div-tags will work. In some cases this messes up your layout though. I haven't found a way to generate a completely empty div-tag, but if you add an XSLT-comment between the opening and closing div-tag, the tags are preserved and render well in most browsers. In the XSLT script it looks like this: Code: <div class="myEmptyDiv"> <xsl:comment>comment</xsl:comment> </div>
This will render the (X)HTML: Code: <div class="myEmptyDiv"><!--comment--></div>
/Thomas K
Web Developer at Kärnhuset - http://www.karnhuset.net - Stockholm, Sweden
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,696 Location: KY, USA
|
One way to handle this (though it may well cause other problems) is to change your xslt's output to 'html' instead of the default 'xml'. At the top of your xslt file you'll want to change this line: Code:<xsl:output method="xml" omit-xml-declaration="yes"/> -to- <xsl:output method="html" omit-xml-declaration="yes"/>
This will let you output empty div's, ul's, etc. cheers, doug.
MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
|
|
 Rank: Fanatic
Joined: 11/24/2006 Posts: 322 Location: Stockholm, Sweden
|
Will there be any drawbacks if you change the output method to HTML? If not, why is it not set as default?
Web Developer at Kärnhuset - http://www.karnhuset.net - Stockholm, Sweden
|
|
|
Guest |