SDI not working for synthetic resource AEMaaCS | Community
Skip to main content
Level 2
March 10, 2023
Solved

SDI not working for synthetic resource AEMaaCS

  • March 10, 2023
  • 2 replies
  • 2357 views

Hello,

We have one synthetic resource and this resource should not be cached.

I have enabled SDI for this synthetic resource. When rendering this resource in the publisher, it is working fine.

But, when rendering it in the dispatcher, with SDI enabled, It is not rendering.

 

I am using local SDK (Aemaacs) and SDI version 3.3.0.
I have tried with multiple versions of SDI but it is still the same.

 

Additionally, I can't see #include tag from SDI in AEM publish as well as in dispatcher.
But, it is working. I have checked it by adding multiple resource type in the SDI configs.

 

Now, there are two open points

1. How can this synthetic resource be loaded in the dispatcher when SDI is enabled? 

2. How to enable SDI to generate #include tag when rendering SDI-supported components in publisher instance?

 

Please share your suggestion on these topics.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by somen-sarkar

Hi,

As per sling documentation looks like synthetic components are not compatible . Pls check the below link :- 

https://sling.apache.org/documentation/bundles/dynamic-includes.html#compatibility-with-components

 

The filter is incompatible with the following types of component:

  • components which handle POST requests or GET parameters (query strings),
  • synthetic components which use suffixes (because suffix is used to pass requestType of the synthetic resource).

Thanks,

Somen

 

 

2 replies

ArpitVarshney
Community Advisor
Community Advisor
March 10, 2023

Hi @ro981 

Just to let you know the SDI path for synthetic resources formed differently than the normal resource.
It appends the resource type in a path like below

<!-- SDI include (path: /content/experience-fragments/sdi-validation/master/_jcr_content/root/text.dynamic.html/weretail/components/content/text, resourceType: weretail/components/content/text) -->

So you need to ensure that the dispatcher configuration should be according to this path and should not restrict this. I think the first step should be checkout dispatcher logs.

Please also checkout these documents if you miss any of the steps


Regards,
Arpit Varshney

 

RO981Author
Level 2
March 10, 2023

Hi @arpitvarshney 

Yes, I can see these comments in the publisher and dispatcher. 

SDI path is similar to the path you have shared.

I have checked dispatcher logs as well and it look something like mentioned below.
[Fri Mar 10 08:50:29.999814 2023] [dispatcher:debug] [pid 516:tid 281473204501248] checking [/content/experience-fragments/sdi-validation/master/_jcr_content/root/text.dynamic.html/weretail/components/content/text]
[Fri Mar 10 08:50:29.999825 2023] [dispatcher:debug] [pid 516:tid 281473204501248] request URL has no extension: /content/experience-fragments/sdi-validation/master/_jcr_content/root/text.dynamic.html/weretail/components/content/text
[Fri Mar 10 08:50:29.999828 2023] [dispatcher:debug] [pid 516:tid 281473204501248] [client 172.17.0.1:53514] cache-action for [/content/experience-fragments/sdi-validation/master/_jcr_content/root/text.dynamic.html/weretail/components/content/text]: NONE

 

But, it is still not rendering synthetic resource.

ArpitVarshney
Community Advisor
Community Advisor
March 10, 2023

@ro981 Is your dispatcher configuration allowing a page with no end extension as the SDI path for a synthetic resource doesn't have an end extension? 

Above shared log clearly indicate dispatcher detected the URL without any extension so check further if it is blocked because of that?

Regards,

Arpit Varshney

somen-sarkar
Community Advisor
Community Advisor
March 10, 2023

Hi,

Is SDI  working for plain resource ? Is the issue  faced only with synthetic resource or both ?

 

Thanks,

Somen

RO981Author
Level 2
March 10, 2023

Hi @somen-sarkar,
It is working fine for plain resource. Issue exist only for synthetic resource.

somen-sarkar
Community Advisor
somen-sarkarCommunity AdvisorAccepted solution
Community Advisor
March 10, 2023

Hi,

As per sling documentation looks like synthetic components are not compatible . Pls check the below link :- 

https://sling.apache.org/documentation/bundles/dynamic-includes.html#compatibility-with-components

 

The filter is incompatible with the following types of component:

  • components which handle POST requests or GET parameters (query strings),
  • synthetic components which use suffixes (because suffix is used to pass requestType of the synthetic resource).

Thanks,

Somen