Nível 1
Nível 2
Faça login na Comunidade
Faça logon para exibir todas as medalhas
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:
Is SDI fully supported in AEM as a Cloud Service?
Does the AEM Cloud Service Dispatcher include the mod_include.so module by default?
Any insights or recommendations would be greatly appreciated.
Thanks!
Solucionado! Ir para a Solução.
Os tópicos ajudam a categorizar o conteúdo da comunidade e aumentam sua capacidade de descobrir conteúdo relevante.
Visualizações
respostas
Total de curtidas
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
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
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"-->
<!--#include virtual="...header.nocache.html"-->
On Dispatcher, the Apache mod_include should resolve that to real content.
If not working, Dispatcher will return:
[an error occurred while processing this directive]
Additional Note
Ensure the nocache.html URLs you are including:
Exist
Are resolvable
Do not get cached in Dispatcher
You can exclude them using a Dispatcher filter rule:
/filter {
/0001 {
/type "allow"
/url "/content/your-site/.*\.nocache.html"
}
}
Alternate (if mod_include still fails):
If you still get [an error occurred while processing this directive], try:
Adding this to dispatcher/src/conf.dispatcher.d/enabled_modules/ssl.conf:
LoadModule include_module modules/mod_include.so
And confirming via logs:
grep include_module dispatcher/logs/error.log
Visualizações
respostas
Total de curtidas
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!
@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!
Visualizações
respostas
Total de curtidas
Visualizações
Curtida
respostas
Visualizações
Curtida
respostas