Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Deleting component in /apps deletes its references in content pages

Avatar

Level 1

I have deleted a component and its coresponding java files. When I do a build to my local instance, the component is deleted as expected.
But in our QA environment found the references of this component in pages is also deleted (verified the page node structure in CRXDE).
Any idea, what is happening here?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@sushmaa61672298,

After authoring pages, the authored component reference nodes becomes apart of the page configuration. When you delete your component from /apps, the authored pages will still be referencing to the deleted component; deleting a component from /apps will not remove referenced nodes from AEM.

so if the component is heavily used, then after deleting the component from /apps, you will be left with a lot of exceptions in the error.log, because the reference cannot be found.

A simple way to remove component reference nodes from authored pages will be to write a custom servlet that will find and remove all unwanted reference nodes.

I hope this helps.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

@sushmaa61672298,

After authoring pages, the authored component reference nodes becomes apart of the page configuration. When you delete your component from /apps, the authored pages will still be referencing to the deleted component; deleting a component from /apps will not remove referenced nodes from AEM.

so if the component is heavily used, then after deleting the component from /apps, you will be left with a lot of exceptions in the error.log, because the reference cannot be found.

A simple way to remove component reference nodes from authored pages will be to write a custom servlet that will find and remove all unwanted reference nodes.

I hope this helps.