Problem deleting content

23 views
Skip to first unread message

Stamate Cristian

unread,
Nov 28, 2016, 7:18:25 AM11/28/16
to Hippo Community
Hi,

    I'm currently working for 1&1 which has 10.2.2 HIPPO CMS Enterprise edition.
    I have a problem when deleting content.
    I was trying to delete all content and swap it with another. I used the console delete option on /content/documents but delete has been interrupted by errors:
    "Error while deleting document 488ad96c-2d9b-4c00-9dbb-cdc211d1e2d8 cannot be removed because it is still being referenced".
    Searched the id of the node in /cms/repository/ but there are no results. I used this X-path search //*[(@hippo:paths='488ad96c-2d9b-4c00-9dbb-cdc211d1e2d8')] order by @jcr:score descending
    It seems several nodes are now blocked and cannot be deleted because of a reference node that does not exist anymore. This is not the only node. There are about 30 nodes in this situation.
    How can I force-delete? Now i can't replace the old folders with new ones because of this problem.
   
Regards,
Cristian Stamate

HippoRider

unread,
Dec 5, 2016, 9:03:42 AM12/5/16
to Hippo Community
Hi,

Tha'ts weird, even when a document is referenced with some component in the channel manager, you can delete it using the console without having this issue.
Did you try doing it using the updater Editor ? If not try executing the script below with XPath query : //content/document/{ProjectNameSpace}/{folderName}

package org.hippoecm.frontend.plugins.cms.admin.updater

import org.onehippo.repository.update.BaseNodeUpdateVisitor
import javax.jcr.Node
import javax.jcr.Value

class UpdaterTemplate extends BaseNodeUpdateVisitor {

 
boolean doUpdate(Node node) {  
   node
.remove();
     log
.debug "removing node ${node}"
   
return false
 
}

 
boolean undoUpdate(Node node) {
   
throw new UnsupportedOperationException('Updater does not implement undoUpdate method')
 
}

}




Best regards
Reply all
Reply to author
Forward
0 new messages