Cannot add "jcr:content" using "Create Node" Action
Closed this issue · 1 comments
The default "Create a node" action has the following command:
-F _charset_=utf-8 -F :nameHint=node -F jcr:primaryType=${primary type|nt:unstructured} -F sling:resourceType=${resource type|project-A/components/abc-definition} ${server}${jcr path|/content}/${node name|new node}/
I have a requirement where the node name and title must be different.
for example: Node name=8458; Node title=New Age
Using -F jcr:title=${jcr title|some title}
i am able to add the "jcr:title" to the new node but this is being added a new node with name "node" and not a "jcr:content" node.
If we look at the folder structure (after creating and downloading as a package from AEM)
Correct behavior when a folder is created from UI
Folders being created when using curly:
Summary of Issues:
- Allow to add the node "jcr:content"
- If i replace "node" in
-F :nameHint=node
with "jcr:content" as-F :nameHint=jcr:content
then a node with name "jcr_content" is created instead of "jcr:content" - Instead of a new folder level being added, add "jcr:content" to ".content.xml"
The solution for this is as follows:
- Remove -F :nameHint=node
- Add /jcr:content at the end of sever path
Here's the updated cURL Command for action "Create a node"
-F _charset_=utf-8 -F jcr:primaryType=${primary type|nt:unstructured} -F sling:resourceType=${resource type|project-A/components/abc-definition} -F jcr:title=${jcr title|suren} ${server}${jcr path|/content}/${node name|new node}/jcr:content
Using this, creates the "jcr:content" node under each folder.