add new folder issue

Avatar

Avatar

josieqqiu

Avatar

josieqqiu

josieqqiu

15-03-2021

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!!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

bilala23933647

Avatar

bilala23933647

bilala23933647

16-03-2021

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.

Answers (3)

Answers (3)

Avatar

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

17-03-2021

@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

Avatar

Avatar

KiranVedantam1992

Avatar

KiranVedantam1992

KiranVedantam1992

16-03-2021

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

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

16-03-2021

@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