Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

Sling Dynamic include not working

Avatar

Level 2

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. 

2 Replies

Avatar

Level 4

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

Avatar

Level 1

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