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?
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):
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?
Help!
//Stephan
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
Cheers,
/Dirk
It seems as if doing
solves it. Does nothing at all.
I'll create an issue on CodePlex.
is working on a reply...