Copied to clipboard

Flag this post as spam?

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


  • radmanmm 117 posts 108 karma points
    Aug 16, 2009 @ 21:44
    radmanmm
    0

    GetXmlNodeById problem

    Hello All,

    I have no idea why this is not working.  I am making the following call:


    <xsl:variable name="physiciansNode" select="umbraco.library:GetXmlNodeById('1130')"/>

     

    The page returns the following text:

    "No published item exist with id 1130"

     

    I have verified, reverified, and verified again, the node I am trying to load IS PUBLISHED!  I can preview the node and the template prints out the pageID which is in fact 1130.

     

    Any ideas why this isn't working?

     

    I have used this call in umbraco 3, and now I can't get it to work in 4.

     

    Thanks.

  • Dirk De Grave 4539 posts 6013 karma points MVP 3x admin c-trib
    Aug 16, 2009 @ 21:54
    Dirk De Grave
    0

    Hi,

     

    Can you do this call without the quotes, as GetXmlNodeById expects an integer parameter.

    <xsl:variable name="physiciansNode" select="umbraco.library:GetXmlNodeById(1130)"/>

     

    Cheers,

    /Dirk

  • radmanmm 117 posts 108 karma points
    Aug 16, 2009 @ 22:07
    radmanmm
    0

    I have tried that too, and the extension puts it in as string, but I did try it both ways.

  • Chris Koiak 700 posts 2626 karma points
    Aug 16, 2009 @ 22:16
    Chris Koiak
    0

    Have you checked that data/umbraco.config xml file contains the node? I know that if the template is outputting the id then the raw xml must be ok.

    Also, try outputting the cached xml directly to the screen, and then check it for the id too.

    <textarea cols=50 rows="50">
    <xsl:copy-of select="umbraco.library:GetXmlAll()"/>
    </textarea

     

  • Chris Koiak 700 posts 2626 karma points
    Aug 16, 2009 @ 22:18
    Chris Koiak
    0

    What happens if you access the node via xslt rather than api calls?

    <xsl:value-of select="$currentPage/ancestor-or-self::node//node{@id='1130'/@nodeName"/>

    Does the page/node name get rendered on screen?

  • radmanmm 117 posts 108 karma points
    Aug 16, 2009 @ 23:05
    radmanmm
    0

    Chris,

    It was not showing up in the GetXmlAll call.  I don't know why.  I know that this particular node does not have an associated template, and neither does its parent, I don't have to have a template to get it into the xml do I?

    Thanks for the additional info.

  • radmanmm 117 posts 108 karma points
    Aug 16, 2009 @ 23:10
    radmanmm
    0

    Hmmm, is it a permissions issue on the server to that data file you mentioned earlier maybe?

  • Ron Brouwer 273 posts 768 karma points
    Oct 28, 2009 @ 17:07
    Ron Brouwer
    0

    I there a solution for this problem? I'm having the same.

    Ron

  • radmanmm 117 posts 108 karma points
    Oct 28, 2009 @ 17:43
    radmanmm
    0

    Ron,

    The problem in my respect was a file permission problem on the umbraco.config file in the config directory.  This is apparently where the site's xml is cached and it is what appears to be used by the admin app.

  • Ron Brouwer 273 posts 768 karma points
    Oct 28, 2009 @ 21:23
    Ron Brouwer
    0

    If that's true, there will be hell to pay :p
    But I can't imagine that is the case.

    I'll let you know tomorrow.

    Ron

  • Ron Brouwer 273 posts 768 karma points
    Oct 29, 2009 @ 10:13
    Ron Brouwer
    0

    It seems the security is set as it should be.

    But no luck so far.

    Ron

Please Sign in or register to post replies

Write your reply to:

Draft