Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

WKND tutorial - custom component creation error

Avatar

Level 2

Hello i am trying the custom component creation chapter drom the tutorial but i created the files as instructed but getting the error while installing the package on local aem instance

 

Shivam_S_0-1621755518376.png

[ERROR] ValidationViolation: "jackrabbit-nodetypes: Node '{}.context [nt:unstructured]' is not allowed as child of node with types '[nt:folder]':
Could not find matching child node definition in parent's node type", filePath=jcr_root\apps\wknd\components\byline\_cq_design_dialog\.context.xml, nodePath=/apps/wknd/components/byline/cq:design_dialog/.context, line=5, column=61
[ERROR] ValidationViolation: "jackrabbit-nodetypes: Node '{}.context [nt:unstructured]' is not allowed as child of node with types '[nt:folder]':
Could not find matching child node definition in parent's node type", filePath=jcr_root\apps\wknd\components\byline\_cq_dialog\.context.xml, nodePath=/apps/wknd/components/byline/cq:dialog/.context, line=5, column=65

 

Please advise

1 Accepted Solution

Avatar

Correct answer by
Level 2

Seems i made a typing mistake and named the file as .context.xml instead of .content.xml. changing name fixed the issue,

Thanks!

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @Shivam_S 

 

What is the jcr:primaryType of all the 3 .content.xml file you have defined?

Ideally the root one should be

jcr:primaryType="cq:Component"

wheras the other 2 i.e. _cq_design_dialog and _cq_dialog should be

jcr:primaryType="nt:unstructured"

Thanks!

Avatar

Level 2

Hi the below are the primaryTypes:

 

1. byline/.context.xml - cq:Component

2. byline/_cq_dialog/.context.xml - nt:unstructured

3. byline/_cq_design_dialog/.context.xml - nt:unstructured

Avatar

Correct answer by
Level 2

Seems i made a typing mistake and named the file as .context.xml instead of .content.xml. changing name fixed the issue,

Thanks!