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

karanmahi

18-06-2020

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.

Accepted Solutions (1)

Accepted Solutions (1)

Arun_Patidar

MVP

20-06-2020

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"/>