Encountered a weird behaviour in one of the environment.
I have a page /content/sites/na/us/en/samplepage when I have browsed this /content/sites/na/us/en/samplepage.infinity.json in one of the environment I am able to get JSON results where as in other environment I am getting plain html. Suprisingly both environment have the same code package deployed but having the differences in serving the content.
*there is no dispatcher involved in both environments, So where do I start to figure out the root cause !!!
Thanks in advance...
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @donquixote_dofl,
The .infinity.json
suffix should return JSON regardless, but if there’s a difference in the Accept
HTTP header (e.g., one environment treats it differently), it could affect Sling’s response type negotiation.
Use a tool like Postman or curl to compare request headers exactly between environments.
curl -I https://yourserver/content/sites/na/us/en/samplepage.infinity.json
Confirm the .infinity.json
selector is correctly recognized.
Make sure both environments have the same Sling Resource Types and Servlet Mappings.
If the resource type or script rendering JSON is missing or overridden in one environment, it might fallback to HTML.
In both environments have the same Sling Resource Types and Servlet Mappings, and the selectors also correctly recognized.
Views
Replies
Total Likes
Did you check error logs? in both environments?
Review the AEM error logs (error.log) in both environments for any exceptions or warnings when accessing .infinity.json.
Look for issues related to Sling Models, resource resolution, or servlet handling.
Check Sling Mappings and Resource Resolution
Verify if there are any differences in the Sling Resource Resolver configurations between the two environments.
Go to /system/console/configMgr and check the Apache Sling Resource Resolver Factory configuration.
Ensure that the JSON extension is not being overridden or mapped differently in one environment.
Sling Resource Resolver configurations between the two environments are same no difference.
Views
Replies
Total Likes
Views
Likes
Replies