Purge final version of an asset

Avatar

Avatar

NickCarballo

Avatar

NickCarballo

NickCarballo

02-11-2020

I am attempting to delete all versions(except the root version) of an asset using a task.

I am using VersionHistory API to remove the version.  It works for all of the versions except for the last one. 

 

I keep getting this error: 

OakIntegrity0001: Unable to delete referenced node

Is there a way to remove final version of the asset?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Vish_dhaliwal

Employee

Avatar

Vish_dhaliwal

Employee

Vish_dhaliwal
Employee

04-11-2020

I think it is not possible to delete the base version node that is there in the jcr:baseVersion property of the asset. Removing version via VersionHistory can throw an exception [1]

 

[1] https://docs.adobe.com/docs/en/spec/jsr170/javadocs/jcr-2.0/javax/jcr/version/VersionHistory.html#re...)

Answers (1)

Answers (1)

Avatar

Avatar

sunjot16

Employee

Avatar

sunjot16

Employee

sunjot16
Employee

02-11-2020

Cause:

Inconsistencies in oak:index/references. This can be caused by using external methods to modify content in the JCR

 
Solution:
Perform reindex for the synchronous indexes of /oak:index/reference