Skip to main content
Manjunath_DJ
Level 2
Dec 28, 2016 1:49 PM UTC
Solved

SDI issue in AEM 6.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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
nimpraveenAccepted solution
Feb 8, 2017 4:12 AM UTC

Manjunath,

PFA updated dispatcher configuration files.

Please let me know if this works.

-Praveen.

9 replies

smacdonald2008
Level 10
Dec 28, 2016 5:04 PM UTC

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

Translate
raja_vijay_sing
Dec 29, 2016 6:12 AM UTC

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

Translate
Manjunath_DJ
Level 2
Jan 3, 2017 5:59 AM UTC

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

Translate
Jan 9, 2017 10:05 AM UTC

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

Translate
Feb 7, 2017 4:17 AM UTC

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.

Translate
Feb 7, 2017 4:46 AM UTC

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.

Translate
Manjunath_DJ
Level 2
Feb 7, 2017 7:21 AM UTC

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

Translate
nimpraveenAccepted solution
Feb 8, 2017 4:12 AM UTC

Manjunath,

PFA updated dispatcher configuration files.

Please let me know if this works.

-Praveen.

Translate
Manjunath_DJ
Level 2
Feb 8, 2017 6:44 AM UTC

Hi Praveen,

Thank you so much it worked :)

Translate