Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

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

karanmahi
Level 4
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
Arun_Patidar
Correct answer by
Community Advisor
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"/>

 

View solution in original post

3 Replies
Varun_Shakya
Community Advisor
Community Advisor

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

antoniom5495929
Level 7
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

Arun_Patidar
Correct answer by
Community Advisor
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"/>

 

View solution in original post