AnsweredAssumed Answered

After move: The node's content is missing

Question asked by robertmarkbram on Jun 13, 2010
Latest reply on Jun 14, 2010 by robertmarkbram
Hi All,

I am writing a class that extends BaseWizardBean. I have the following code to move the node (which represents a file) to a different folder.


NodeService ns = getNodeService();
// get the Space to apply changes too
NodeRef nodeRef = this.getNode().getNodeRef();
// Folder this doc belongs to.
NodeRef docFolder = ns.getPrimaryParent(nodeRef).getParentRef();
// Get ebns - parent folder to docFolder.
NodeRef ebns = ns.getPrimaryParent(docFolder).getParentRef();
// Find destination folder within ebns.
NodeRef destNodeRef = this.getFileFolderService().searchSimple(ebns, "nextFolderName");
// Move the node.
try {
   getFileFolderService().move(nodeRef, destNodeRef, "some new name");
} catch (FileExistsException e) {
   e.printStackTrace();
} catch (FileNotFoundException e) {
   e.printStackTrace();
}

My problem is that the node (or at least the metadata) does indeed appear under the new node, but the content has gone. When I click on it I get:

The node's content is missing: 
   node: workspace://SpacesStore/e16ed62d-36b7-45ef-93c2-b19eafffc1e6
   reader: null 
Please contact your system administrator.

No exceptions occurred. Any help would be most appreciated!

Rob
:)

Outcomes