Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Sightly in AEM 6.3: org.apache.sling.api.request.RecursionTooDeepException:

Avatar

Avatar
Validate 25
Level 4
BigT168
Level 4

Likes

27 likes

Total Posts

155 posts

Correct Reply

3 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 4
BigT168
Level 4

Likes

27 likes

Total Posts

155 posts

Correct Reply

3 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
BigT168
Level 4

21-07-2017

In AEM 6.3 /apps/core, there is a list component. Try to reuse this component and just overwrite the item.html to make a news listing component.

I have a news component with title, date, content and News.java (using sling models: adaptables = SlingHttpServletRequest.class). 

A list component lists all news.

I reuse the list.html, however I have to modify the item.html to retrieve the news node. Don't know how exact to do that.

<sly  data-sly-resource="${resource @ appendPath='/jcr:content/root/news'}">

<div class="myproject-news"

     data-sly-use.article="myproject.news">

</sly>

        <h4 class="myproject-news-title">${ news.title }</h4>

But I am getting an error: org.apache.sling.api.request.RecursionTooDeepException:

Can anyone please help?

Thanks.

View Entire Topic

Avatar

Avatar
Boost 5
Level 4
zeeshank1500736
Level 4

Likes

28 likes

Total Posts

103 posts

Correct Reply

33 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile

Avatar
Boost 5
Level 4
zeeshank1500736
Level 4

Likes

28 likes

Total Posts

103 posts

Correct Reply

33 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile
zeeshank1500736
Level 4

22-07-2017

Hi ,

I am not able to replicate this exception in your code because this exception is thrown by the Sling implementation if to many recursive content inclusions take place.

Why are you using the list component to make the News Component.you want to display the title,date and content of the news for that either use multifield in dialog and then iterate through the data and display it. Other wise make a simple dialog having three field Title of news(ton), Date of news(datefield), Content(RTE) .At every new news drag and drop the component and fill the data into the dialog and display it for displaying below is the modiified code.

<div class="myproject-news">

        <h4 class="myproject-news-title">${properties.title}</h4>

          <h3> ${properties.date}</h3>

          {properties.content @ context='html'}

</div>

where date = name of date field in dialog (./date)

title =name of title in dialog (./title)

content = name of content (./content)

Thanks