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

WKND tutorial - custom component creation error

Shivam_S
Level 2
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
Shivam_S
Correct answer by
Level 2
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
asutosh_jena
Community Advisor
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!

Shivam_S
Level 2
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

Shivam_S
Correct answer by
Level 2
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