cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete file link force

koichinakata
Champ on-the-rise
Champ on-the-rise

Hi,

There's a problem in Alfresco community 5.2. 
I found some file links whose destination is NULL, and try to delete those, but failed.
"Force delete" on nodebroser doesn't work with below error.

050729912 Property 'nodeRef' has not been set: org.alfresco.repo.doclink.DocumentLinkServiceImpl@46666a9c (class org.alfresco.repo.doclink.DocumentLinkServiceImpl)

Can somebody help me?
Koichi.

4 REPLIES 4

koichinakata
Champ on-the-rise
Champ on-the-rise

Does anybody know how to remove remained link without error?

I am getting the same error. Have anyone found any solutions?

douglascrp
World-Class Innovator
World-Class Innovator

What do you see in the logs when you try to delete it?

Can you post the full stack trace?

One idea would be to set a "fake" destination pointing to some existing document and then trying to delete the link.

logs complain about:

  [web.scripts.ActionEvaluatorHelper] Evaluator 'null' not found.

Propably,  I had created through javascript some links nodes without adding the "app:linked" aspect to the source node. So when I deleted the source node, the destination property was empty. That seems to cause the above warning, and errors while previewing folder from share (empty folder, "loading Document Library ...").

Using javascript, I set the destination property, using the name, e.g.

var user_home = companyhome.childByNamePath("User Homes/test"); // some folder
for (var i = 0; i< user_home.getChildren().length; i++) {
    if (user_home.getChildren()[i].name.endsWith( "link.url") )  { //my links had the same prefix
        user_home.getChildren()[i].properties["cm:destination"]  = "workspace://SpacesStore/adc38ba8-e5a9-4ce3-b323-03a3967fba84";
        user_home.getChildren()[i].save();
    }
}

and then managed to delete this links.

It seems that creating links using javascript is prone to errors, if the code is as the one at DocumentLinkServiceImpl.java .