PageManager delete function triggers Activate ? | Community
Skip to main content
vjleo94
Level 3
September 16, 2022
Solved

PageManager delete function triggers Activate ?

  • September 16, 2022
  • 1 reply
  • 746 views

Hi, 

 

When using pageManage.delete(page); 

This triggers activation of the page we are deleting and I see that the page is removed from the publisher as well when doing this. But can anyone explain why the action is "Activate" ?

 

Thanks and Regards,

Vijaya Kumar A

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by lukasz-m

Hi @vjleo94,

I think this is happening only when you will set shallow parameter to true. In that case only jcr:content will be removed, and cq:Page node will remain (at least this is how it works on AEM 6.5.12)

The path that delete method is using is a path to cq:Page. So this is why you see Activate action. What is happening behind the scene, jcr:content node is removed on author instance, and cq:Page (which is root for jcr:content) is activated to propagate the change. This will assure, that activation status which normally is stored under jcr:content will be moved to cq:Page level. If jcr:content will just be deactivated you would loose the logical connection between author and publish instance.

If this is not behavior you are expecting you can simply set shallow parameter to false, in that case Deactivate or Delete action should be used.

1 reply

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
September 16, 2022

Hi @vjleo94,

I think this is happening only when you will set shallow parameter to true. In that case only jcr:content will be removed, and cq:Page node will remain (at least this is how it works on AEM 6.5.12)

The path that delete method is using is a path to cq:Page. So this is why you see Activate action. What is happening behind the scene, jcr:content node is removed on author instance, and cq:Page (which is root for jcr:content) is activated to propagate the change. This will assure, that activation status which normally is stored under jcr:content will be moved to cq:Page level. If jcr:content will just be deactivated you would loose the logical connection between author and publish instance.

If this is not behavior you are expecting you can simply set shallow parameter to false, in that case Deactivate or Delete action should be used.