Copied to clipboard

Flag this post as spam?

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


  • ss 16 posts 36 karma points
    Nov 19, 2010 @ 14:18
    ss
    0

    Xslt Not working with new schema in version 4.5.2

     Hello All,

                  I have upgraded my umbraco from 4.0 to 4.5.2 with the neccessary step to do the upgrade successful.

                 my problem is that i cant make any new schema code to work in my xslt.. Any help or suggestion is apperciable as soon as possible.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 20, 2010 @ 02:58
    Jan Skovgaard
    0

    Hi SS

    Have you tried to make a <xsl:copy-of select="$currentPage" /> to see what XML you get returned?

    And are you sure you're running the new schema? And if so, have you republished the entire site?

    /Jan

  • ss 16 posts 36 karma points
    Nov 22, 2010 @ 07:50
    ss
    0

     Yes i tried  with the code u have provided.. it displays the output like this..  i have macro in the pageContent field and Front Page is the pageHeading.. is that the correct ouput?

    Front Page <p>&nbsp;</p> <?UMBRACO_MACRO macroAlias="Test" /> <p>&nbsp;</p>

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 22, 2010 @ 08:14
    Jan Skovgaard
    0

    Please post the code you have tried to output. You should get some XML returned when using xsl:copy-of - seems like you may have been using xsl:value-of instead?

    The macro you're trying to output, has i been placed in the rich text editor? If so, are you sure the "use in editor" has been checked?

    /Jan

  • Powellze 38 posts 73 karma points
    Nov 22, 2010 @ 09:55
    Powellze
    0

    HI SS,

     

    Have you republished your site since you have upgraded?

    Even when switching between the old and new schema via the true/false I think you still need to republish the site?

     

    Tim

  • ss 16 posts 36 karma points
    Nov 22, 2010 @ 10:19
    ss
    0

     Yes i did that but no effect..

    i am just trying with this line of code <xsl:value-of select="$currentPage/pageHeading"/> to display the page heading. but nothing gets displayed.......

    what should i do to make it work..

  • ss 16 posts 36 karma points
    Nov 22, 2010 @ 10:28
    ss
    0

    <xsl:copy-of select="$currentPage" /> i used this code only..

  • ss 16 posts 36 karma points
    Nov 22, 2010 @ 11:55
    ss
    0

    i am choosing the asp.net framework 4 .. is any problem with that? plz reply how can i make the new schema work..

    now i have my umbraco.config like this ..

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE root[
    <!ELEMENT node ANY> <!ATTLIST node id ID #REQUIRED>  <!ELEMENT data ANY>

    ]>
    <root id="-1">
      <node id="1051" parentID="-1" level="1" writerID="0" creatorID="0" nodeType="1049" template="1050" sortOrder="2" createDate="2010-11-19T15:16:55" updateDate="2010-11-22T16:24:52" nodeName="Forside" urlName="forside" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="Forside" path="-1,1051">
        <data alias="pageHeading">Front Page </data>
        <data alias="pageTeaser"><![CDATA[]]></data>
        <data alias="pageContent"><![CDATA[
    <p>&nbsp;</p>

    <?UMBRACO_MACRO macroAlias="Test" />

    <p>&nbsp;</p>
    ]]></data>
        <node id="1054" parentID="1051" level="2" writerID="0" creatorID="0" nodeType="1052" template="1053" sortOrder="1" createDate="2010-11-19T17:27:28" updateDate="2010-11-22T16:24:34" nodeName="SubPage" urlName="subpage" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="Side" path="-1,1051,1054">
          <data alias="pageHeading">
          </data>
          <data alias="pageTeaser"><![CDATA[]]></data>
          <data alias="pageContent"><![CDATA[]]></data>
        </node>
        <node id="1055" parentID="1051" level="2" writerID="0" creatorID="0" nodeType="1052" template="1053" sortOrder="2" createDate="2010-11-19T17:29:02" updateDate="2010-11-22T16:24:14" nodeName="SubPage1" urlName="subpage1" writerName="Administrator" creatorName="Administrator" nodeTypeAlias="Side" path="-1,1051,1055">
          <data alias="pageHeading">
          </data>
          <data alias="pageTeaser"><![CDATA[]]></data>
          <data alias="pageContent"><![CDATA[]]></data>
        </node>
      </node>
    </root>

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 22, 2010 @ 12:40
    Jan Skovgaard
    0

    Now we're getting somewhere :-)

    In the config folder, pick the umbracosetting.config and in that file change the setting in the "use legacy" or what the element is called to false.

    /Jan

  • ss 16 posts 36 karma points
    Nov 22, 2010 @ 13:10
    ss
    0

    Thank you very much.. it solved my problem.. Before itself i set use legacy to false but i didnt see any effect.. should we need to set it false and republished the entire site? because i did like that only now.. plz can u explain me why it happens?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 22, 2010 @ 13:48
    Jan Skovgaard
    0

    Well by default a clean 4.5.2 installation and I think, also an upgrade, should be running the new schema. So why it was not doing that I don't have a clue about. Maybe you or someone else had changed it unawaringly?

    But when you change the schema it makes sense that you need to republish the site, since the umbraco.config (which is the xml cache) need to be changed as well, so that it's not using the data element. Before you republish and you change the schema it was structured with the format of the old schema.

    I hope this makes sense?

    And happy you got it solved :-)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft