Copied to clipboard

Flag this post as spam?

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


  • Halldór Hrafn Gíslason 30 posts 50 karma points
    Oct 01, 2010 @ 13:53
    Halldór Hrafn Gíslason
    0

    Strange node object property behaviour, observed through VS debug

    Hi,

    I'm experiencing quite a strange behaviour interactiong with node, it's parent node and that (parent) node's NiceUrl.

    I'm querying Umbraco for the current node's parent node, wich works just fine.

    Then I want to get that parent node's NiceUrl, to navigate down to it (this is a sport of a back button functionality).

    The resulting parent node is not the root of the website (wich is as expected).

    I'm trying to go from /parent/somenode to /parent.

    However.. when I ask for the parent node's NiceUrl (C#: parent.NiceUrl) it results in "#", and umbraco gives me the friendly (ugly) 404 message when I do a Responce.Redirect(parent.NiceUrl).

    The strange thing is, when I step through the execution (using Debug-Attache to process) I see when .NET thinks that the NiceUrl of the parent node is "#".
    BUT, if I expand the parent object, and explore the NiceUrl property (during debugging) it results in the correct path!

    See picture, same property from two different views:

    So, if I debug the code, and view the property (while hovering with the mouse in the code view), the code will work. Otherwize it'll result in a "#"

    I'm a little puzzled here.. should I find a rock to bang my head against or does anyone have a solution/fix for me ? :o)

  • Halldór Hrafn Gíslason 30 posts 50 karma points
    Oct 01, 2010 @ 14:22
    Halldór Hrafn Gíslason
    0

    p.s. I'm debugging this on a IIS running on Win7 and .net 4 (with all the latest updates, including the recent exploit)

  • Halldór Hrafn Gíslason 30 posts 50 karma points
    Oct 02, 2010 @ 11:01
    Halldór Hrafn Gíslason
    0

    Bump.

    This is a bit of a problem for me, please advice :)

    Thanks,
    H

  • Halldór Hrafn Gíslason 30 posts 50 karma points
    Oct 04, 2010 @ 10:25
    Halldór Hrafn Gíslason
    0

    Bump bump.

    Am I the only one experiencing this or am I perhaps doing something that no-one does anywhay ?

  • Anders Rørvik 25 posts 47 karma points
    Oct 29, 2010 @ 14:25
    Anders Rørvik
    0

    We've had this issue several times as well, our solution was to use the umbraco.library.NiceUrl() function to generate the url instead.

  • Peter 89 posts 160 karma points
    Nov 25, 2010 @ 16:24
    Peter
    0

    Andres, thanks for the work around. :)

Please Sign in or register to post replies

Write your reply to:

Draft