Sri
Sri

Reputation: 1217

cq5 not returning child pages json data on '...infinity.json' request

Even though following path http://localhost:4502/content/geometrixx/en/products.infinity.json returning folllowing json.

enter image description here

But same page request in my upper environments (DEV, Stage, QA boxes) returning following json

enter image description here

Can anyone shed some light on this ? I am trying to read child pages data for one of the component and it is working great in local but not in upper environment boxes.

Thank you!

Upvotes: 2

Views: 6377

Answers (2)

Ana Vinatoru
Ana Vinatoru

Reputation: 191

Given that these are stage / production instances, it's possible that additional security measures were taken. If you look at the security checklist, you will see it recommends limiting number of nodes exposed by the Sling Get Servlet [0]:

https://docs.adobe.com/docs/en/aem/6-1/administer/security/security-checklist.html

So if the json.maximumresults property of the Apache Sling Get Servlet was set to 5, the page.infinity.json request won't return all the nodes in the tree.

If you have access to the instance's configuration manager (/system/console/configMgr), you can check the value of the json.maximumresults property for this servlet.

[0] https://github.com/apache/sling-org-apache-sling-servlets-get/blob/dd8af0d1d4c9666ffb16d5324a47e41ba413d973/src/main/java/org/apache/sling/servlets/get/impl/DefaultGetServlet.java#L126

Upvotes: 2

JE Bailey
JE Bailey

Reputation: 749

The second response looks like you are hitting the jcr:content sub node directly

/content/geometrixx/en/products/jcr:content.infinity.json

The reason I say this, is that the response in your second request is the same as the graph beneath your jcr:content node in the first response.

If the request is the same, you might want to look at your resource mappings to see if something is modifying your request.

Upvotes: 0

Related Questions