SDI issue in AEM 6.2 | Community
Skip to main content
Manjunath_DJ
Level 2
December 28, 2016
Solved

SDI issue in AEM 6.2

  • December 28, 2016
  • 9 replies
  • 5409 views

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

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 nimpraveen

Manjunath,

PFA updated dispatcher configuration files.

Please let me know if this works.

-Praveen.

9 replies

smacdonald2008
Level 10
December 28, 2016

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

raja_vijay_sing
December 29, 2016

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

Manjunath_DJ
Level 2
January 3, 2017

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

January 9, 2017

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

February 7, 2017

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.

February 7, 2017

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.

Manjunath_DJ
Level 2
February 7, 2017

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

nimpraveenAccepted solution
February 8, 2017

Manjunath,

PFA updated dispatcher configuration files.

Please let me know if this works.

-Praveen.

Manjunath_DJ
Level 2
February 8, 2017

Hi Praveen,

Thank you so much it worked :)