Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Stop versioning on Page deletion

Avatar

Level 4

Hi,

How to stop versioning on page deletion ? Whenever page is deleted, version is getting created before it is deleted.

Thanks!!

4 Replies

Avatar

Level 9

Hey Sankar,

you have a valid request but as far as I know, there is no such OOTB check where versioning could be stopped for a particular case. However, curious to know why do we want such thing?. Don't you think there could be an issue if user deletes by mistake later wants to revert it?.

sankarr26533925 wrote...

Hi,

How to stop versioning on page deletion ? Whenever page is deleted, version is getting created before it is deleted.

Thanks!!

 

Avatar

Level 4

Thanks Jitendra for your inputs. I need to sync some page content from one instance to other instance whenever page is created/versioned.  

Listener should not run whenever page is deleted. Now it is running because the page is versioned before deletion. I can't figure it out whether the page is actually versioned or deleted. I am using JCR event listeners

Please share your inputs if you have any solution for this.

Avatar

Level 9

Hi,

I think we both got page versioning wrong. In a case of page delete, there is no page versioning. Version history maintains the last version of deleted page. So, if you have added a listener on page delete, I am sure it is not doing versioning by default. However, if you are doing through the code then that is a different case. 

Let me know if you understand what I am trying to say?.

---Jitendra 

Avatar

Level 4
        Hi jitendra, Do u agree whether the version will be created for the page before it is deleted ? I tested the page deletion functionality on OOTB instance and found that two events are generated under /var/audit/com.wcm.core.page/deleted page/. one is for version created and other is for page deleted..