cancel
Showing results for 
Search instead for 
Did you mean: 

Can't delete Sample site

ddelapasse
Champ in-the-making
Champ in-the-making
Why is it SO hard to delete stuff?  Share is unable to delete files often, but I can always (so far) delete via Explorer.  I really need to remove the Sample site, but you can't use Explorer for sites and Share says "deleting site" (yes, I am admin or I wouldn't see the button) and then "unable to delete site" with nothing in the log file.

So after googling, I tried this:
> curl -H "Accept: application/json" -H "Content-type: application/json" -X DELETE –user admin:xxxx http://localhost:8080/alfresco/service/api/sites/swsdp
{
    "status" :
  {
    "code" : 409,
    "name" : "Conflict",
    "description" : "Request could not be completed due to a conflict with the current state of the resource."
  },
  "message" : "org.alfresco.service.cmr.lock.NodeLockedException: 05220234 Cannot perform operation since the node ( id:9b0c6637-6b04-4454-be8b-a3963262a658) is locked.",
  "exception" : "",
  "callstack" :  [ ],
  "server" : "Community v4.2.0 (r63893-b12) schema 6,033",
  "time" : "Jun 22, 2015 9:01:25 AM"
}

We have not used this site, so I can't imagine why a node would be locked.  We use repo and not sites.
I tried unlocking the node via javascript but was told "access denied".  Are there instructions for deleting the database entry and removing it manually somewhere?

Any other ideas?
1 REPLY 1

ddelapasse
Champ in-the-making
Champ in-the-making
For anyone else who has this problem I found a nasty solution.  I wrote a webscript to unlock the node in the REST api's error message. Then I ran and got ANOTHER locked node..and then another… I had to do this 8-10 iterations, but finally the curl command succeeded. 

Webscript was:
     var foundNode = search.findNode("workspace://SpacesStore/9b0c6637-6b04-4454-be8b-a3963262a658");
     foundNode.unlock();
     foundNode.save();

Moving on but…ughh…this doesn't give me confidence in the product!