Skip to main content
Level 2
October 19, 2016

Sling Dynamic include not working

  • October 19, 2016
  • 2 replies
  • 1591 views

In our site, a component is not supposed to be cached as we need updated data. To cater to this requirement we are using SDI version 2.2.0. But, it doesn't seem to add any SSI tags, neither is it adding anything extra when I include it using javascript. 

For more information, I am attaching the snapshot of our configuration and the httpd.conf file. 

 

Also, I  have added it in publish instance. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

kishore_polsani
Level 4
December 7, 2016

Remove "/apps/" in the resource type and try

February 28, 2017

Hi from snapshot that you posted i could make out:

  1. SDI jar which is being referenced is Version2.2.1 SNAPSHOT.jar
  2. However SDI which is deployed and active is of version 2.0.4 as mentioned in your POM.xml
  3. This SDI jar is being referenced to your apps folder (you didn't deployed SDI jar file to OSGi layer but it got deployed along with your code).

I too faced this issue for me these changes did the trick:

  1. Upload sling-dynamic-include-2.2.1-SNAPSHOT.jar to OSGi bundles (Possible location - C:\Users\<winuser>\.m2\repository\com\cognifide\cq\sling-dynamic-include\2.2.1-SNAPSHOT)
  2. Redeploy your code after updating SDI jar version in POM.xml
    1.            <dependency>
                  <groupId>com.cognifide.cq</groupId>
                  <artifactId>sling-dynamic-include</artifactId>
                  <version>2.2.1-SNAPSHOT</version>
              </dependency>
  3. Remove /apps/ from Resource Types field under SDI configuration. Your Resource Types should look like - statoil/components/content/vacancylist
  4. Also please ensure that - you are using cq:include to include your content. And resourceType here should match with one you quoted under SDI configuration.

 

I have added snapshots for better understanding

Regards

Manav Ratra