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

After code deployment to AEM, jcr:primaryType gets converted to nt:folder from sling:folder

Avatar

Level 4
We have this structure, /conf/<appname>/settings/wcm. In source code we have jcr:primaryType: slingFolder for <appName> and for settings folder. But when this code gets deployed to AEM, jcr:primaryType is getting converted to nt:folder instead of sling:folder. Any pointers will be highly appreciated.
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

There may be an issue with XML namespace.

Can you check if you appsName and settings .content.xml looks like below:

 

MyApp/.content.xml

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="sling:Folder"
    jcr:title="MyApp"/>

 

settings/.content.xml

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="sling:Folder"/>

 



Arun Patidar

View solution in original post

3 Replies

Avatar

Community Advisor

Check .content.xml  file of all folder and check jcr:primaryType Property  

Avatar

Level 7

Hi @karanmahi ,

can you check if you have "mixin" applied to app folder?

A screenshot or a package of your xml could be helpfull. 

 

Thanks,

Antonio

Avatar

Correct answer by
Community Advisor

There may be an issue with XML namespace.

Can you check if you appsName and settings .content.xml looks like below:

 

MyApp/.content.xml

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="sling:Folder"
    jcr:title="MyApp"/>

 

settings/.content.xml

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="sling:Folder"/>

 



Arun Patidar