Page 2 of 2

Re: Updating Property Group - Forever

PostPosted:Wed Jul 29, 2015 11:18 am
by chatteridiot
Dear both, Now this issue is solved. I cannot reproduce the same error anymore.
Im using Version: 6.3.1-DEV (build: 8225)

Thanks alot guys.

Re: Updating Property Group - Forever

PostPosted:Thu Aug 27, 2015 9:42 am
by pavila
You're welcome!

Re: Updating Property Group - Forever

PostPosted:Sat Feb 25, 2017 12:00 pm
by BBK
On OpenKM-6.3.0-community edition a dev group member managed to create this incident. I've just found this thread and found out that in 6.3.1 this already fixed, but despite I've upgraded in two phases from 6.3.0-community to 6.3.2-community, the problematic file is still causing the freezing feature. I do not wanted to try if the error can be reproduced with other file but my question would be: despite that the fix prevents this incident to be happened, how can the already affected file be corrected?

Update:
I was able to cancel the checkout after finding that you have included a nice scripting tool in OpenKM! Thanks guys for the effort!
Code: Select all
import com.openkm.api.*;
import com.openkm.core.*;
import com.openkm.bean.*;
import com.openkm.module.db.stuff.*;

String token = DbSessionManager.getInstance().getSystemToken();

for (Document doc : OKMDocument.getInstance().getChildren(token, "/okm:root/my/path/to/the/incident/file/folder/")) {
        print("Document: " + doc.getPath() + "<br>");            
        
        if (OKMDocument.getInstance().isLocked(token, doc.getPath())) {
            OKMDocument.getInstance().forceUnlock(token, doc.getPath());
        }
        
        OKMDocument.getInstance().lock(token, doc.getPath());
         
        OKMDocument.getInstance().cancelCheckout(token, doc.getPath());

        OKMDocument.getInstance().unlock(token, doc.getPath());
    }