Deleting component in /apps deletes its references in content pages

sushmaa61672298

27-01-2020

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?

Accepted Solutions (1)

Accepted Solutions (1)

BrianKasingli

MVP

13-07-2020

@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.

Answers (0)