Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

SDI issue in AEM 6.2

Avatar

Level 2

Hi,

I am trying to implement SDI in AEM + Dispatcher using Sling Dynamic Include 2.2.1

I have followed steps as per https://github.com/Cognifide/Sling-Dynamic-Include 

AEM components embedded in template level as below:

<div data-sly-resource="${'test' @ resourceType='test/components/test'}"></div>  

AEM configuration:

# Configuration created by Apache Sling JCR Installer
include-filter.config.ignoreUrlParams=[""]
include-filter.config.resource-types=["test/components/test"] 
include-filter.config.enabled=B"true"  
include-filter.config.path="/content"
include-filter.config.required_header="Server-Agent\=Communique-Dispatcher"
include-filter.config.include-type="SSI"
include-filter.config.selector="nocache"
include-filter.config.add_comment=B"true" 
include-filter.config.rewrite=B"false"
include-filter.config.ttl=""

Dispatcher configurations :

Made separate httpd config file as below and included in httpd 

LoadModule dispatcher_module modules/disp_apache2.2.dll
 
<IfModule disp_apache2.c>
  DispatcherConfig conf/dispatcher.any
  DispatcherLog    logs/dispatcher.log
  DispatcherLogLevel 3
  DispatcherNoServerHeader 0
  DispatcherDeclineRoot 0
  DispatcherUseProcessedURL 0
  DispatcherPassError 0
</IfModule>
SetOutputFilter INCLUDES

<Directory />
  <IfModule disp_apache2.c>
    SetHandler dispatcher-handler
    ModMimeUsePathInfo On
  </IfModule>
 
  Options FollowSymLinks
  AllowOverride None
</Directory> 

Dispatcher.any with

 /disable-nocache
        {
        /glob "*.nocache.html*"
        /type "deny"
        }

But when am trying to access the page with dispatcher component is not rendered on page but view source include as below:

<div><!-- SDI include (path: /content/test5/_jcr_content/test.nocache.html/test/components/test, resourceType: test/components/test) -->

<!--#include virtual="/content/test5/_jcr_content/test.nocache.html/test/components/test" --></div>    

Thanks,

Manjunath

1 Accepted Solution

Avatar

Correct answer by
Level 1

Manjunath,

PFA updated dispatcher configuration files.

Please let me know if this works.

-Praveen.

View solution in original post

9 Replies

Avatar

Level 10

I recommend contacting the author in the GITHub repo for this question. They would be in the best position to answer this question. 

Avatar

Level 1

Hi,

The SDI is configured fine that is why you are able to see the SSI tags. your webserver is not configured to process the server side includes.

Refer

https://httpd.apache.org/docs/current/howto/ssi.html

Avatar

Level 2

Thank you for the  reply Raja. I got your point SSI tag inclusion concludes SDI configuration is good and  Web-server is unable to process SSI.

But as per documentation in https://github.com/Cognifide/Sling-Dynamic-Include configurations are done in dispatcher side 

 <Directory /> Options FollowSymLinks Includes AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews Includes AllowOverride None Order allow,deny allow from all </Directory>
    /disable-nocache { /glob "*.nocache.html*" /type "deny" }

And also tried  https://httpd.apache.org/docs/current/howto/ssi.html configurations bit no luck yet.

Thanks,

Manjunath

Avatar

Level 1

Hi ..Am also facing the same issue. When SDI is enabled the component is not rendered in the dispatcher.

Avatar

Level 1

Hi Manjunath,

I am facing similar issue in 6.2. Did your issue get resolved.

Please let me know if you have any pointers on this.

Regards,

Praveen.

Avatar

Level 1

Hi Manjunath,

I found the issue.

You need to add the Includes directive to the Options where your Apache DocumentRoot is configured.

Please let me know if you need more info.

- Praveen.

Avatar

Level 2

Hi Praveen,

I am still unable to resolve these issue. can you please help me out on this.

I am attaching the dispatcher.any/dispatcher..conf/httpd.config files

Thanks,

Manjunath DJ

Avatar

Correct answer by
Level 1

Manjunath,

PFA updated dispatcher configuration files.

Please let me know if this works.

-Praveen.

Avatar

Level 2

Hi Praveen,

Thank you so much it worked :)