sling:orderBefore not working on overlay node /libs/cq/core/content/nav/tools/operations | Community
Skip to main content
bsr060893
Level 3
August 20, 2020
Solved

sling:orderBefore not working on overlay node /libs/cq/core/content/nav/tools/operations

  • August 20, 2020
  • 2 replies
  • 2622 views

Hi,

I wanted to add a new node under opertaions, so i overlaied from /libs to /apps.

If i add sling:orderBefore node and set it to sites, the node is breaking after the code built and the operations are not displayed in the sites.

Is there any issue with the code using sling:orderBefore?

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured">
<tools jcr:primaryType="nt:unstructured">
<operations jcr:primaryType="nt:unstructured"
sling:orderBefore="sites">
</operations>
</tools>
</jcr:root>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

Can you check if the property is getting added or not if you deploy using package manager or code?

From your XML, I can see sling namespaces are missing.

 

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"

2 replies

Nupur_Jain
Adobe Employee
Adobe Employee
August 20, 2020

Hi @bsr060893 

 

which version of AEM are you using?

I tried and it worked for me.

 

 

Thanks!

Nupur

bsr060893
bsr060893Author
Level 3
August 20, 2020

Hi @nupur_jain ,

The issue is when we try to export via code.
it worked fine if we add from the crx.

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
August 22, 2020

Can you check if the property is getting added or not if you deploy using package manager or code?

From your XML, I can see sling namespaces are missing.

 

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
Arun Patidar
bsr060893
bsr060893Author
Level 3
August 26, 2020

@arunpatidar, Property is not getting added.

Also namespace was not added to filte.xml when the archtype was created by default.