Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

PageManager delete function triggers Activate ?

Avatar

Level 2

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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.