Expand my Community achievements bar.

SOLVED

add new folder issue

Avatar

Level 3

hi @Jörg_Hoh 

we have a project added a new folder, and make a new package to install at new server, but we find after finish install we just can see the path structure, but every path cannot render content.  meanwhile if we copy the content to any new path that create by author server (http://localhost:4503/siteadmin#/content), every path can render at author server! 

so we unzip the package find the .content.xml under the new path in the content install package  is 


<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Page">
<xxx/>
</jcr:root>

 

seems miss something, usually cq:Page may have a jcr:content node ,but this file have not, may I know  must add jcr:content node when  jcr:primaryType="cq:Page"?

 

in fact when we add a content node to that file, and install it , every path can render at author server . but we just confuse why no content node every page under xxx cannot render?

 

thanks!!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @josieqqiu , your content.xml should look like this:

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="cq:Page">
    <jcr:content
        jcr:primaryType="cq:PageContent"
        jcr:title="My Test Folder"/>
</jcr:root>

 

create the cq:Page/folder/node structure in AEM and then import the respective nodes in your IDE(eclipse/IntelliJ/Visual Studio), then make changes if you may have to. Sometimes when we make changes in content.xml or try adding a structure/page/folder we miss something that doesn't fail the build, however the structure is wrong and that messes up when we do the local build+deploy in AEM.

Thanks,

Bilal.

View solution in original post

9 Replies

Avatar

Community Advisor

@josieqqiu I am trying to understand your query more better . Could you please help answer the below questions ?

 

"we have a project added a new folder, and make a new package to install at new server" - How did you create the package ? Can you cross check if the paths are added properly . If you are creating package from author and if the pages are all working fine in author , then package created should not be having an issue until you are the filters properly. 

 

Thanks

Veena

Avatar

Level 3

hi, we have a project, migrate to cloud from old server, and the AME is upgrade 6.1 to 6.5, the migration department use tools create a new path at first level all the content is under this new path. the content can display under folder /content. but cannot display under the new folder.  I have mention at above that .context.xml under new path seems miss something, we just want to know is that due to page cannot render?

Avatar

Community Advisor

Hi @josieqqiu,

 

If my understanding is correct, you have created a new folder [for adding the content pages] and once it is installed, you do not see any content under it, am I right?

 

For this, you need to check and update the filter.xml file in the below path

  • project\ui.apps\src\main\content\META-INF\vault\filter.xml

The path will vary depending upon the location of your folder.

Add a root like this:

  1. <filter root="folder-path"/>

If this does not help,

  1. add the same page in another path that is working [as you have already mentioned that you have tried it, and is working] and install the code
  2. Create a package of the content using the package manager and download it
  3.  Extract it and find the appropriate filter.xml with the correct filter code 

 

Hope this helps.

 

Thanks,

Kiran Vedantam.

 

Avatar

Level 3
hi we have check not this issue. filter.xml we have check is correct

Avatar

Community Advisor
Hi, please check the logs, if you getting any error on installation

Avatar

Correct answer by
Community Advisor

Hi @josieqqiu , your content.xml should look like this:

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="cq:Page">
    <jcr:content
        jcr:primaryType="cq:PageContent"
        jcr:title="My Test Folder"/>
</jcr:root>

 

create the cq:Page/folder/node structure in AEM and then import the respective nodes in your IDE(eclipse/IntelliJ/Visual Studio), then make changes if you may have to. Sometimes when we make changes in content.xml or try adding a structure/page/folder we miss something that doesn't fail the build, however the structure is wrong and that messes up when we do the local build+deploy in AEM.

Thanks,

Bilal.

Avatar

Level 3

@bilal_ahmadmay I know must jcr: content node have  at .content.xml  when jcr:primaryType
="cq:Page"? if no this node , will it impact the content under current folder? big thx for your help!

Avatar

Community Advisor
@josieqqiu Yes, If it's a cq:Page, it should have a jcr:content node associated with it.

Avatar

Community Advisor

@josieqqiu From your response under my previous reply and re-reading your question

 

in fact when we add a content node to that file, and install it , every path can render at author server . but we just confuse why no content node every page under xxx cannot render?

 

-Does this mean you are trying to put the content under a different node than /content ? Something like /xxxx insteand of /content ? 

    If that is the case it will not work. The AEM Sling Resolution happens from /content nodes. I mean to say , in simple words, your content should always be present under /content. You can have nodes under content , for e.g /content/xxx ; but not the other way around

 

I am still not sure if I got your question right. But that is okay. Do let me know if this is not what you are expecting . 

 

Thanks

Veena