cancel
Showing results for 
Search instead for 
Did you mean: 

Recover folder from trashcan which is giving Cyclic parent-child relationship detected

digcat
Confirmed Champ
Confirmed Champ
hi all,
Ive had a bizarre error today on an old 5.0.d server, somehow a user has created a Cyclic parent-child relationship detected, by Node has been pasted into its own tree. and then they deleted it.  Now they want to recover it  But the trashcan is giving an error (error loading items),
 
ERROR [node.ibatis.NodeDAOImpl$MySQL] [ajp-bio-8009-exec-10] Cyclic parent-child relationship detected:
current node: 2355329
current path: {http://www.alfresco.org/model/content/1.0}New_x0020_Folder_x0020_With_x0020_Items/{http://www.alfres...
next assoc: 2119453
2020-03-10 02:21:21,772 ERROR [node.archive.NodeArchiveServiceImpl] [ajp-bio-8009-exec-10] An unhandled exception stopped the restore
org.alfresco.service.cmr.repository.CyclicChildRelationshipException: Node has been pasted into its own tree.
 
Ive located the suspect archived node using jsconsole, then can display the noderef in node browser, and can see the folder has same parent name, which im assuming is the cyclic error.  My question is, is it possible to fix this cyclic error, using jsconsole, or is it doomed, and Id need to pick the content out from the stores directly? and how the heck did they cause an error which trips up the trashcan with a error loading items error.
 
 
oh and I also tried sending a PUT to the archive service to recover that way, but that also triggered the cyclic error using the curl command in this post
 
1 ACCEPTED ANSWER

Hi Angel

Thanks for the pointer, Axel helped me as well, here is the process for anybody else who hits this issue.

to fix the cyclic error, create a new folder and delete it so its available in archive.

the use the id of this folder as the parent_node_id of the culprit node giving the error in nodebrowser.

update alf_child_assoc set parent_node_id = <id of new folder> where id = <id of node erroring in nodebrowser>

View answer in original post

3 REPLIES 3

angelborroy
Community Manager Community Manager
Community Manager

You can amend the parent node in the database or using JConsole before recovering. Is this an option?

Hyland Developer Evangelist

Hi Angel

Thanks for the pointer, Axel helped me as well, here is the process for anybody else who hits this issue.

to fix the cyclic error, create a new folder and delete it so its available in archive.

the use the id of this folder as the parent_node_id of the culprit node giving the error in nodebrowser.

update alf_child_assoc set parent_node_id = <id of new folder> where id = <id of node erroring in nodebrowser>

digcat
Confirmed Champ
Confirmed Champ

make sure to restart after making the change to the database !!!!

Getting started

Explore our Alfresco products with the links below. Use labels to filter content by product module.