Expand my Community achievements bar.

Issues with deleting the folder

Avatar

Level 4

Hello Community,

We have the folder/node in AEM under the path /apps/cq/gui/content(overlay) that was installed as part of package install.

The requirement is to remove the overlay and all the nodes under the path by updating the filter xml definition so that the subsequent
package install should get rid-off the folder or overlay (/apps/cq/gui/content) completely without impacting the existing nodes under /apps/cq(i.e out of the box nodes).

 

I have deleted the custom overlay/folder from the project and updated the filter xml(pasted below) but the files are not getting deleted from AEM.

 

Can someone let me know what could be the issue?

 

Filter.xml
<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
<!-- Add this filter to delete the /apps/cq/gui/content overlay -->
<filter root="/apps/cq/gui/content"/>
</workspaceFilter>

6 Replies

Avatar

Community Advisor

Hi, 

 

Do you have an empty structure in your codebase under /apps/cq/gui/content as the filter configuration you have is set to allow deployment of whatever is in your codebase?



Esteban Bustamante

Avatar

Level 4

Yes I have the empty structure in the codebase to delete all the files under the path /apps/cq/gui/content

Avatar

Community Advisor

@test1234567 

 

Please place a proper .content.xml under the "/apps/cq/gui/content". Cross-check the details from /libs folder and give it a try..

 

As per mu understanding, empty folders are ignored. If they are, you might also find the related statement in mvn build logs


Aanchal Sikka

Avatar

Level 4

Thanks for your reply. .content.xml is already the part of the folder but still it is not deleting any nodes.

Avatar

Community Advisor

Hi @test1234567 
Can you check the order of package deployment?

Please try suggestion by @aanchal-sikka  and @EstebanBustamante  if nothing works, then you can try on-deploy script.

https://adobe-consulting-services.github.io/acs-aem-commons/features/on-deploy-scripts/index.html 



Arun Patidar

Avatar

Administrator

@test1234567 Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni