Copied to clipboard

Flag this post as spam?

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

  • Stephan Lonntorp 195 posts 212 karma points
    Jan 05, 2011 @ 08:33
    Stephan Lonntorp

    Moving CMSNode via API, causes strange data in the Node API

    OK, so here's the scenario:

    A user clicks a button, and a page (1307) is then moved to another part of the site.

    The original location (path): -1,1113,1202,1288,1291,1307

    The new location (path): -1,1113,1201,1295,1298,1307

    I accomplish it this way (code removed for brevity):

    myDocument.Publish(new User(0));

    Now, this works fine, almost. The document is moved in the tree. The path is updated to reflect its new position in the hierarchy. But. The Node isn't moved in the XML, not even after a complete republish, so getting the data via the Node API (.Parent for instance), gives med the old parent (1291), when it should be 1298.

    What do I need to do here? Flush the entire cache? Update the parents document cache?

    Should it be possible for a Node to have a path that isn't reflected by its actual position in the node structure?



  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jan 05, 2011 @ 09:13
    Dirk De Grave

    Can you repro this on other nodes as well? Had a look at the source code for a Move() but wasn't really able to pinpoint where it may go wrong...

    If you can repro this on other nodes as well, I'd log this as a bug on Codeplex, to get the core team's attention.

    Don't see anything wrong with the code you provided



  • Stephan Lonntorp 195 posts 212 karma points
    Jan 05, 2011 @ 09:25
    Stephan Lonntorp

    It seems as if doing



    solves it. Does nothing at all.

    I'll create an issue on CodePlex.

Please Sign in or register to post replies

Write your reply to: