Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • leeatkinson 33 posts 44 karma points
    Oct 20, 2010 @ 13:13
    leeatkinson
    0

    Upgrading v4 to v4.5 - XSLT doesn't work even with UseLegacyXmlSchema set to True

    Hi

     

    I have upgraded v4 to v4.5, but I cannot get my XSLTs to work. I first tried to update to the new schema and that didn't work. So i reverted to the4 working v4 XSLT and changed UseLegacyXmlSchema to True and it doesn't still work.

    The XLST I am working on is for a menu system - the v4 XLST is:

    <xsl:template match="/"><ul class="menu">
     <li>
      <a href="/">Home</a>
      <xsl:text disable-output-escaping="yes"><![CDATA[<span></span>]]></xsl:text>
     </li>
     <xsl:apply-templates select="$currentPage/ancestor-or-self::node[@level=1]/node" />
    </ul>
    </xsl:template>
    <xsl:template match="node">
     <xsl:if test="(data[@alias='umbracoNaviHide'] != '1') and ((umbraco.library:IsProtected(@id,@path) = false()) or (umbraco.library:HasAccess(@id,@path) = true()))">
      <xsl:variable name="hasChildren" select="(@level &lt; 4) and (count(./node[(data[@alias='umbracoNaviHide'] != '1') and ((umbraco.library:IsProtected(@id,@path) = false()) or (umbraco.library:HasAccess(@id,@path) = true()))]) &gt; 0)" />
      <li>
       <a>
        <xsl:attribute name="href">
         <xsl:value-of select="umbraco.library:NiceUrl(@id)" />
        </xsl:attribute>
        <xsl:value-of select="@nodeName" />
       </a>
       <xsl:choose>
        <xsl:when test="$hasChildren=true()">
         <span class="expand"></span>
         <ul><xsl:apply-templates select="./node" /></ul>
        </xsl:when>
        <xsl:otherwise>
         <xsl:text disable-output-escaping="yes"><![CDATA[<span></span>]]></xsl:text>
        </xsl:otherwise>
       </xsl:choose>
      </li>
     </xsl:if>
    </xsl:template>

     

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 20, 2010 @ 13:25
    Dirk De Grave
    1

    Have you republished your content tree using /umbraco/dialogs/republish.aspx?xml=true after the upgrade?

     

    Cheers,

    /Dirk

  • leeatkinson 33 posts 44 karma points
    Oct 20, 2010 @ 13:45
    leeatkinson
    0

    Yes that worked!

    Is this something I needed to do because I changed UseLegacyXmlSchema to true, or just generally because of the upgrade? If I upgraded the XSLT to v4.5, would i need to do this as well?

    Lee

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 20, 2010 @ 13:53
    Dirk De Grave
    0

    well, i'm always using the wiki article when upgrading, and ran into that issue before, so it's kind of been there, done that. And yes, generally a good idea also when changing to use the new xml schema to regenerate the xml!

     

    Cheers,

    /Dirk

  • leeatkinson 33 posts 44 karma points
    Oct 20, 2010 @ 18:21
    leeatkinson
    0

    I missed that wiki article - I found another (rather short) one that had only a few steps on how to upgrade.

    That did resolve it - and I've managed to update all of the XLSTs to work with v4.5 now.

    Onto the next problem I'm having http://our.umbraco.org/forum/getting-started/installing-umbraco/13776-Updated-v4-v45-but-members-cannot-login

Please Sign in or register to post replies

Write your reply to:

Draft