After code deployment to AEM, jcr:primaryType gets converted to nt:folder from sling:folder | Community
Skip to main content
Level 4
June 18, 2020
Solved

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

  • June 18, 2020
  • 3 replies
  • 1943 views
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.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

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

 

3 replies

Varun_Shakya
Community Advisor
Community Advisor
June 19, 2020

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

antoniom5495929
Level 7
June 19, 2020

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

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
June 20, 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"/>

 

Arun Patidar