Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Getting error Recursion too deep Exception

Avatar

Level 1

I was trying to add some functionality in core component container. So when I added some styling properties like width,height to container component ,there was option in container component for selecting Layout ,so when I chose  simple layout and try to add some component in container component I am getting error of recursion too deep exception in sightly.I will post the error too. If you guys have any solution then please recommend.

org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.request.RecursionTooDeepException: /content/us/en/test/learning/jcr:content/root/container/container

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @surajtripathi,

 

Can you post the sightly/html file of the container component?

The RecursionTooDeepException is thrown by the Sling implementation if to many recursive content inclusions take place. The limit of recursive inclusions is implementation dependent.

 

One suggestion if using <sly data-sly-resource>, provide ${resource.path} or ${currentPage.path} as opposed to ${resource} to avoid looking for all resources under current resource.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @surajtripathi,

 

Can you post the sightly/html file of the container component?

The RecursionTooDeepException is thrown by the Sling implementation if to many recursive content inclusions take place. The limit of recursive inclusions is implementation dependent.

 

One suggestion if using <sly data-sly-resource>, provide ${resource.path} or ${currentPage.path} as opposed to ${resource} to avoid looking for all resources under current resource.