How to find Same Name Sibling (SNS) Nodes?

Recently after a successful in-place upgrade from AEM 6.0 to 6.3, we tried to open a few pages and those pages were breaking. Post-debugging, we found that there were nodes with the same name as their parent nodes i.e. Same Name Sibling (SNS) Nodes. This was working correctly in AEM 6.0 version.

What are Same Name Sibling (SNS) Nodes in AEM?

Basically, these are nodes with the same name as their parent nodes. This was allowed up till AEM 6.0 version or CRX2 you can say.

Same Name Sibling (SNS) Nodes
sns-same-name-sibling-node-problem-crx2-crx3

How to fix it?

After some research, we found this knowledgebase page on the AEM site which talks about the deprecation of SNS (Same Name Sibling) in the CRX3 Oak version. It says:

Before Jackrabbit Oak, it was possible to create same name sibling nodes(SNS) in CRX 2. However, to upgrade to CRX 3 Oak, those nodes need to be removed.

https://helpx.adobe.com/experience-manager/kb/find-sns-nodes.html

This page from Adobe help describes how to find such nodes using the Felix script console. It has also provided a script that can be easily adapted to log only SNS nodes under a certain path.

You need to write some backend code that will take these paths and fix them in the backend/CRX as per your requirement.

Feel free to share your thoughts on this topic in the comments section below 👇 We would be happy to hear and discuss the same 🙂

Spread the word!
0Shares

Leave a comment

Your email address will not be published. Required fields are marked *