Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Kunal_Gaba_
Kunal_Gaba_Accepted solution
New Member
Feb 5, 2016 4:01 PM UTC

Sh1ju wrote...

@ Jitendera ,Its already versionable.please check the screen shot

 

 

The versionable mixin is applied on jcr:content node whereas in your code you are trying to do the operation on mm1 node which may not have the mixin. 

14 replies

Jitendra_S_Toma
Level 10
Feb 5, 2016 9:51 AM UTC

Hi,

Have you tried purging versions using OOTB service?.

Day CQ WCM Version Purge Task

Jitendra

Translate
Jitendra_S_Toma
Level 10
Feb 5, 2016 11:08 AM UTC

Hi,

If you are using AEM 6.0/6.1, here is another tool which could help you purging versions.

http://localhost:4502/etc/versioning/purge.html

Sh1ju wrote...

Can you please share the code for Version Purging  using  VersionManager (com.day.cq.wcm.api)

 

Translate
Kunal_Gaba_
Kunal_Gaba_Accepted solution
New Member
Feb 5, 2016 4:01 PM UTC

Sh1ju wrote...

@ Jitendera ,Its already versionable.please check the screen shot

 

 

The versionable mixin is applied on jcr:content node whereas in your code you are trying to do the operation on mm1 node which may not have the mixin. 

Translate
OldOldOld
Level 2
Feb 26, 2016 3:26 PM UTC

The wemblog code removes all newer versions except the base version, which is probably not what you want (keep the latest version only).

To get the code:

  • search for VersionManagerImpl in CRXDE, this will give you a path like /libs/wcm/core/install/cq-wcm-core-5.6.24.jar
  • create a package in package manager with that path, build it, download it, unzip it and extract the jar with "jar xf cq-wcm-core-5.6.24.jar"
  • download a Java "disassembler" like http://jd.benow.ca/
  • open the VersionManagerImpl.class file
  • look at the "purgeVersions" method to see how its done
Translate