Expand my Community achievements bar.

Join expert-led, customer-led sessions on Adobe Experience Manager Assets on August 20th at our Skill Exchange.
SOLVED

SDI Issue on Dispatcher in AEM as a Cloud Service

Avatar

Level 2


Hi community,
We are implementing Sling Dynamic Include (SDI) to include the header and footer components in AEM as a Cloud Service. The necessary configurations have been set up on the dispatcher, but the components are not rendering as expected.

We are encountering the following error:
[an error occurred while processing this directive]

Before further troubleshooting, we would like to confirm:

  1. Is SDI fully supported in AEM as a Cloud Service?

  2. Does the AEM Cloud Service Dispatcher include the mod_include.so module by default?

Any insights or recommendations would be greatly appreciated.

Thanks!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 6

Hi @sai_charanAr 

 

SDI is not officially supported in AEM as a Cloud Service. As an alternative, you can use client-side includes or make AJAX calls to achieve similar functionality.

 

Regards

Ayush

View solution in original post

4 Replies

Avatar

Correct answer by
Level 6

Hi @sai_charanAr 

 

SDI is not officially supported in AEM as a Cloud Service. As an alternative, you can use client-side includes or make AJAX calls to achieve similar functionality.

 

Regards

Ayush

Avatar

Community Advisor

Hi @sai_charanAr ,

1. Is SDI supported in AEM as a Cloud Service?

YES, with limitations:

SDI with SSI (Server Side Includes) ➜ Supported

SDI with ESI (Edge Side Includes) ➜ NOT supported, since Adobe’s CDN (Fastly) does not support ESI with gzip.

2. Does AEMaaCS Dispatcher support mod_include.so?

YES, mod_include is included and enabled by default in the Dispatcher in AEM as a Cloud Service.

Full Working Setup for SDI (SSI) in AEM as a Cloud Service

Step-by-Step Working Guide


A. Install and Configure SDI OSGi Bundle on Author & Publish

Add the Sling Dynamic Include OSGi config via code:

org.apache.sling.dynamicinclude.Configuration~ssi.cfg.json

Sample content:

{
  "enabled": true,
  "filter.resourceTypes": [
    "your-project/components/structure/header",
    "your-project/components/structure/footer"
  ],
  "include.type": "SSI",
  "add_comment": false
}

Deploy the config via your project’s /apps folder or config structure (ui.config in Cloud Manager).

B. Ensure Apache Dispatcher Allows SSI

In your Cloud Dispatcher config (dispatcher/src/conf.d/available_vhosts/your_vhost.conf), add:

<Directory />
    Options Includes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

SetOutputFilter INCLUDES
AddOutputFilter INCLUDES .html

Ensure the .html output is processed by mod_include.

C. Use the Correct HTML Markup in Your Component

When SDI is working, the server will render this type of SSI directive:

<!--#include virtual="/content/your-site/us/en/jcr:content/root/header.nocache.html"-->

 

Avatar

Community Advisor

Hi @sai_charanAr,

Please refer to the similar question here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/sling-dynamic-include-on-a...

ACS Commons SDI - it  does not fully worked in AEM as a Cloud Service
 because in AEMaaCS, you don’t have direct Dispatcher module access the way you do in on-premise AEM.
AEM Cloud handles a lot of caching and request routing differently (mostly through CDN and Adobe-managed Dispatcher configs), and Server-Side Includes (SSI) are not enabled by default or even fully supported.

  • In AEMaaCS, SDI/SSI approaches are not officially supported.

  • Instead, Adobe recommends using Client-Side Includes (JS-based dynamic content loading) or AJAX calls for dynamic parts.

For more information on ACS AEM Commons and its compatibility with AEMaaCS, you can refer to the official documentation: adobe-consulting-services.github.io

Hope that helps!


Santosh Sai

AEM BlogsLinkedIn


Avatar

Administrator

@sai_charanAr Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!



Kautuk Sahni