Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Delete rolled out pages in one shot

Avatar

Level 2

Hi Friends,

I have a question regarding deleting rolled out pages in one shot.

Example scenario: Lets say I have rolled out a page from english to 10 english speaking countries accidentally and currently to delete those pages, I am going to each locale and deleting it. Is there any way we can delete all these 11 pages in one shot ?

 

Thanks, eagerly waiting for reply.

1 Accepted Solution

Avatar

Correct answer by
Level 10

There is not OOB to do the job for you. If its done accidentally and one time job, then I would suggest you to go and delete it manually

View solution in original post

4 Replies

Avatar

Level 10

Out of the box no - but you can write a custom workflow that would do the job. Have you considered an AEM workflow?  Or another solution would even write a custom tool that deletes nodes from the JCR. There are different ways you can approach this if you want to write some code. 

Avatar

Level 8

Simply write a sling servlet or a service and inside that write a query searching for the pages which have been rolled out, like while being rolled out every page must have been added with some property. In your query search pages with that property and delete all the pages which comes as a result.

Avatar

Correct answer by
Level 10

There is not OOB to do the job for you. If its done accidentally and one time job, then I would suggest you to go and delete it manually

Avatar

Administrator

Hi

As mentioned by other experts, there is not such OOB to achieve this.

I would Support Lokesh's answer, that if this is one time job, them its better to do this deletion manually.

If not, then you need to write a Sling Servlet/Service to achive this as mentioned my Hemant i.e. "write a query searching for the pages which have been rolled out, like while being rolled out every page must have been added with some property. In your query search pages with that property and delete all the pages which comes as a result."

I hope this would help you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni