Expand my Community achievements bar.

SOLVED

Server Side Includes (SDI) Not Working on AEM 6.5.15

Avatar

Level 2

Hello, we have a Dev env where after we upgraded from 6.5.4 to 6.5.15, our SSI/SDI includes started failing.

 

The include is called on the Publisher directly with a suffix of user UUID:

/content/<path to page>/<page>.html/<user UUID> --header "Server-Agent: Communique-Dispatcher"

 

When include works correctly, the rendered include looks like:

 

<!-- SDI include (path: /content/<path to component>/_jcr_content/root/responsivegrid/orgchart.nocache.html/<user UUID>, resourceType:, <component resource type>) -->

 

However, after the upgrade, our SDIs are failing and render as:

 

<!-- SDI include (path: /content/<path to component>/_jcr_content/root/responsivegrid/orgchart.nocache.html/<component resource type>.html, resourceType:, <component resource type>) -->

 

Note that instead of having a suffix of the user UUID, the SDI has the <component resource type>.html.

 

Any ideas about what is going here would be most helpful! TIA! 

1 Accepted Solution

Avatar

Correct answer by
Administrator

Answer shared by @jonathanRad 

 

We found the issue and came to a resolution on this. Basically our issue is this https://www.mail-archive.com/dev@sling.apache.org/msg129314.html. Somewhere between SP11 and 15 the behavior of Synthetic Resources changed to remove the URL suffix and replace it with the component resource type. This behavior is in UrlBuilder in the Sling API. So if you're using a suffix to pass information to your component, it will no longer work. We worked around the issue by using a URL selector instead of the suffix. The SSI feature then creates an include with the selector intact and the component can get it from the URL using the RequestPathInfo.getSelectorString(). Hope this helps! 



Kautuk Sahni

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @jonathanRad 
Can you try to put a debugger/logger and check , what is contributing to this unexpected behaviour?



Arun Patidar

Avatar

Level 1

Hello @arunpatidar 

Just to verify if the SDI is functioning properly, in the log which class should I include? thank you

Avatar

Administrator

@jonathanRad Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

 



Kautuk Sahni

Avatar

Correct answer by
Administrator

Answer shared by @jonathanRad 

 

We found the issue and came to a resolution on this. Basically our issue is this https://www.mail-archive.com/dev@sling.apache.org/msg129314.html. Somewhere between SP11 and 15 the behavior of Synthetic Resources changed to remove the URL suffix and replace it with the component resource type. This behavior is in UrlBuilder in the Sling API. So if you're using a suffix to pass information to your component, it will no longer work. We worked around the issue by using a URL selector instead of the suffix. The SSI feature then creates an include with the selector intact and the component can get it from the URL using the RequestPathInfo.getSelectorString(). Hope this helps! 



Kautuk Sahni