Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Reference Unpublish and Delete

Avatar

Level 4

We are currently using live copies on our site .

Our requirement is to unpublish and delete the live copy references when the the master page is unpublished and delete . We noticed that in some cases , when master is delete the live references still stay on the sites page -

 

What is the default behavior of OOTB AEM?

If we use the Manage Publication to unpublish the master and its children( Assuming -Live copy references as considered as children) - And then using the delete , is the OOTB behavior suppose to correctly clear(unpublish and delete) all the data correctly . Or is there any exceptional case where this would not work. And if this is not the default behavior . Is any API which would gives us all the references when given a path ?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @AEMnewbie ,

 

You can use OOTB servlet  (/bin/wcm/references) to check the references. You can write one OSGI service which can hit this servlet to check the reference and take action accordingly.

 

http://localhost:4502/bin/wcm/references?
_charset_=utf-8
&path=<path of the page>
&predicate=wcmcontent
&exact=false

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @AEMnewbie ,

 

Ideally we never delete page from Author for potential data lose. Because Unpublish anyways deletes pages from Publish instance so we really do not need to hard delete from author.

Now to answer your question, OOTB, live copies are not impacted on master copy deletion. We can configure rollout configuration on master page properties for custom content update, content delete.

 

Please refer below video and page to understand the concept-

https://www.youtube.com/watch?v=ZQnJkMWBW84

https://www.youtube.com/watch?v=iez6_qvnBKY

https://experienceleague.adobe.com/docs/experience-manager-64/administering/introduction/msm-sync.ht...

 

You can check the live copies in reference tab. Just select the page and open the left rail to see the references.

 

 

references.png

 

Avatar

Employee Advisor

Hi @AEMnewbie!

The behavior of the live copy depends on your rollout configuration. If you have set the "Deactivate on Blueprint deactivation" configuration for your live copy relationship, then the live copy page will automatically be unpublished if you unpublish the blue print page.

The deletion of a page automatically triggers a deactivation if that page was published, indirectly triggering a depublication for the live copy page as well. The deletion of the page on author side will also inherit the deletion to the live copy.

If your setup is based on a non-published blue print you might need to add a custom rollout configuration to handle that specific case. Also, if the inheritance is canceled for a specific case you will have to manage the deletion of the blue print page manually.

 

If you need to customize the behavior, please refer to the following documentation (relevant APIs are linked on that page):

Hope that helps!

Avatar

Level 4
Thanks @markus_bulla_adobe @Ritesh_Mittal. We have taken care of the new one's , but for the existing one , i am thinking to come up with a script or a servlet which would go ahead and unpublishes/delete the live copy. Is there an ideal way to do this?

Avatar

Correct answer by
Community Advisor

Hi @AEMnewbie ,

 

You can use OOTB servlet  (/bin/wcm/references) to check the references. You can write one OSGI service which can hit this servlet to check the reference and take action accordingly.

 

http://localhost:4502/bin/wcm/references?
_charset_=utf-8
&path=<path of the page>
&predicate=wcmcontent
&exact=false