Copied to clipboard

Flag this post as spam?

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


  • Henrik Hammarström 58 posts 54 karma points
    Mar 02, 2011 @ 07:47
    Henrik Hammarström
    0

    upgrade to 4.5.2

    Hi
    Iam upgrading to 4.5.2 and in the backend it looks good but in the frontend only the templates is there.
    It seems that non of the xslt files is producing data to frontend.
    Theres no error..

    I have
    Republish the site
    Deleted "passwordFormat="Hashed""

    Any thing more I can do ?
    /H

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 02, 2011 @ 08:23
    Jan Skovgaard
    0

    Hi Henrik

    I guess you have probably upgraded from an earlier version of Umbraco before 4.5?

    There has been a change in the XML schema so that is probably why the XSLT does not render anything.

    You can either alter the XSLT files to match the new schema or you can use the legacy schema in the umbracoSettings.config and you XSLT files will work again.

    You can read more about the differences in the new schema here: http://blog.leekelleher.com/2010/04/02/working-with-xslt-using-new-xml-schema-in-umbraco-4-1/ (It's about 4.1 but this was renmaed to 4.5 before release)

    /Jan

  • Henrik Hammarström 58 posts 54 karma points
    Mar 02, 2011 @ 10:45
    Henrik Hammarström
    0

    Hi and thanks...
    I tried to change <UseLegacyXmlSchema>true</UseLegacyXmlSchema>
    but nothings render...
    It there anything more I can look at ?
    /H

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 02, 2011 @ 10:48
    Jan Skovgaard
    0

    Hi Henrik

    Did you refresh the XML chache afterwards? Otherwise you'll need to do this by going to the "Content" node in your content section and choose "Republish entire site".

    Then the XML cache is refreshed and the settings should take effect. Otherwise try restarting the IIS site if it's possible.

    /Jan

  • Henrik Hammarström 58 posts 54 karma points
    Mar 02, 2011 @ 11:32
    Henrik Hammarström
    0

    Hi and thank you very much for the help..
    to bad nothings changes

    Everythings looks good at backend

    Down below there is an xslt example for topnavigation I have

    It doesnt render at all

    I have republish my site
    I change this to true again true

     

    *************************************************************************

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet
     version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:msxml="urn:schemas-microsoft-com:xslt"
     xmlns:umbraco.library="urn:umbraco.library"
     exclude-result-prefixes="msxml umbraco.library">


    <xsl:output method="xml" omit-xml-declaration="yes" />

    <xsl:param name="currentPage"/>

    <xsl:variable name="level" select="2"/>

    <xsl:template match="/">

    <xsl:if test="count($currentPage/ancestor-or-self::node [@level=$level]/node [string(data [@alias='umbracoNaviHide']) != '1']) &gt; 0">
    <ul id="secondLevelNavigation">
    <xsl:for-each select="$currentPage/ancestor-or-self::node [@level=$level]/node [string(data [@alias='umbracoNaviHide']) != '1']">
     <li>
      <a href="{umbraco.library:NiceUrl(@id)}" title="Navigera till {@nodeName}">
       <xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
        <!-- we're under the item - you can do your own styling here -->
        <xsl:attribute name="class">selected</xsl:attribute>
       </xsl:if>
       <xsl:value-of select="@nodeName"/>
      </a>
     </li>
    </xsl:for-each>
    </ul>
    </xsl:if>
    </xsl:template>

    </xsl:stylesheet>

  • Henrik Hammarström 58 posts 54 karma points
    Mar 02, 2011 @ 11:36
    Henrik Hammarström
    0

    it was a relay bad example/wrong I Give you a new one later

  • Henrik Hammarström 58 posts 54 karma points
    Mar 02, 2011 @ 11:44
    Henrik Hammarström
    0

    I try to do a new topnavigation from the macro templates and not even that one render so something else is wrong
    It comes to this line
    <xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc and @level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">
    no longer

    /H

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 02, 2011 @ 12:44
    Jan Skovgaard
    0

    Hi Henrik

    Everytime you change the value in the umbracoSettings.config be sure to update the XML cache or try restarting the application to make sure the changes take effect.

    Now...what happens if you create a blank XSLT macro and place it in one of your templates, where you make a copy-of like this...

    <textarea>

    <xsl:copy-of select="$currentPage" />

    </textarea>

    Does it return anything? (Please notice I've omitted the template stuff etc.

    /Jan

  • Henrik Hammarström 58 posts 54 karma points
    Mar 02, 2011 @ 15:54
    Henrik Hammarström
    0

    Hi
    Yes it return alot of data...

    Thanks

    If I understand it right it is like this
    my old xslt would work if I change<UseLegacyXmlSchema>true</UseLegacyXmlSchema>?
    Otherwise I need to rewrite them ?

    Can you give me a tip how this would look like ?

    <xsl:for-each select="$currentPage/ancestor-or-self::node [@level=1]/node">
     <xsl:if test="string(./data [@alias='umbracoNaviHide']) != '1'"> 
    |
    <xsl:choose>
    <xsl:when test="$currentPage/@level &gt; 1 and contains(concat(',',@path,','), concat(',',$currentID,','))">
    <strong><xsl:value-of select="@nodeName"/></strong>
    </xsl:when>
    <xsl:otherwise>
     
    <a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="@nodeName"/></a>

    </xsl:otherwise>
    </xsl:choose>
    </xsl:if> 
    </xsl:for-each>

    /H

Please Sign in or register to post replies

Write your reply to:

Draft