Locked Document in 5.0.d
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2016 09:59 AM
Hi
I have 1 document in my test system that has a hardcore persistent lock. keeps me from trying to reproduce some issues. restart does _not_ clear the lock.
the document is not visible in the share doclib view. but it can be found in the node browser.
the document has these lock related properties:
cm:lockType = READ_ONLY_LOCK
cm:lockLifetime = PERSISTENT
cm:lockAdditionalInfo = null
cm:lockOwner = admin
And following lock-related aspects.
cm:lockable
cm:checkedOut
i can only access the preview of the document by assembling the url:
... document-details?nodeRef=workspace://SpacesStore/9d647cd6-fdb6-…
=> none of the document actions are present, the right menu is missing completely.
message on top says The item cannot be found. Either you do not have permissions to view the item, it has been removed or it never existed.
I also tried via js console to
node.removeAspect("cm:checkedOut");
= Cannot perform operation since the node (id:9d647cd6-fdb6-4033-83e7-08f05b1d3565) is locked.
node.cancelCheckout();
= Access Denied. You do not have the appropriate permissions to perform this operation.
node.unlock();
= The node (id: 9d647cd6-fdb6-4033-83e7-08f05b1d3565) could not be unlocked since it is checked out.
ran these as admin.
no locks on alfresco related tables in the database.
halp!
version is 5.0.d community
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2016 11:32 AM
A node 's lock is saved in cm:lockable aspect and cm:lockType property.
If you have checked that there is no lock related record in database,then it could be that the cache is not synchronized with database. Can you try to restart you alfresco?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2016 03:38 PM
Hi - A restart does not make the lock go away unfortunately.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2016 08:49 AM
Are you having GDrive integration? I ran into some issue during GDrive integration. Issue was because document was marked as checkout from GDrive side. So, unless I login into GDrive and explicitly mark it as editing completed I was not able to do any operations on that document.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2016 03:27 PM
No - Google integration is disabled.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2016 11:07 AM
As I mentioned in IRC #alfresco yesterday I typically solve this via the JavaScript Console by removing the aspects and/or properties for this as you already tried. The important thing to do to make this work is to disable behaviours in the script before you attempt to remove the aspects / properties. So you need to lookup the "policyBehaviourFilter" bean (examples for bean lookup in a gist of mine: Useful Alfresco JavaScript console scripts · GitHub) and simply call "disableBehaviour()" on it. This operation only disables behaviours in the current transaction so there should be no side effect. Since all the core services building upon the foundation services are (typically) using behaviours for providing their functionality this is a master recipe to work around any issues they may cause / be a part of.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2016 05:35 PM
You could also use the alfresco-jscript-extensions:
There is a policy root object and here is an example for using it:
shows how to temporarly disable and enable the policy behaviours of a node · GitHub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2018 03:18 AM
Just try this code to remove unwanted lock from a node:
[code]
var ctxt = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext();
var policyBehaviourFilter = ctxt.getBean('policyBehaviourFilter', Packages.org.alfresco.repo.policy.BehaviourFilter);
policyBehaviourFilter.disableBehaviour();
document.removeAspect("cm:checkedOut");
document.removeAspect("cm:lockable");
[/code]