Contexual Content Variables(CCVAR) configuration not working even for the OOTB properties. | Community
Skip to main content
Level 2
January 31, 2022

Contexual Content Variables(CCVAR) configuration not working even for the OOTB properties.

  • January 31, 2022
  • 1 reply
  • 2238 views

Hi,

 I have gone through the document  https://adobe-consulting-services.github.io/acs-aem-commons/features/contextual-content-variables/index.html

and followed every step as mentoned in the doc for the CCVAR. I followed HTML rewriting approach but still I am not able to even showcase the basic OOTB properties provided for CCVAR like ((page_properties.jcr:title)). Could someone please help me out here and let me know in case i am missing some configuration or any step that needs to be done before the configuration. As of now I am able to see my rewriter in Sling rewriter status and my ccvar configuration in web console config but still in my page I am not able to see any properties value. Any help will be much apprecaited. In case of more information on this please let me know.

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

1 reply

lukasz-m
Community Advisor
Community Advisor
February 19, 2022

Hi @sinshi1308, I was able to successfully configure Contextual Content Variables on clear AEM 6.5.11 using ACS Commons version 5.1.2. I have followed the instruction from page you are referring to. I did not made any additional steps. Could you please provide following information:

  1. AEM version you are using (including SP version)
  2. ACS Commons version you are using
  3. Content path where you expecting CCVAR to be applicable.
  4. You CCVAR configuration, including PropertyAggregatorServiceImpl and rewriter configuration
  5. Do you have any other customization on your AEM instance?
Level 2
February 19, 2022

Hi @lukasz-m 

Please find below the information:-

  1. AEM version you are using (including SP version) - AEM(6.5.11.0)
  2. ACS Commons version you are using - 5.1.0
  3. Content path where you expecting CCVAR to be applicable.- /content/tda/retail/dbs
  4. You CCVAR configuration, including PropertyAggregatorServiceImpl and rewriter configuration 

     

     

    I have deployed a blank OSGi configuration file from my project deployment. /apps/dbs/config/com.adobe.acs.commons.ccvar.impl.PropertyAggregatorServiceImpl.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
      jcr:primaryType="sling:OsgiConfig"/>
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml version="1.0" encoding="UTF-8"?>
    <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
              jcr:primaryType="nt:unstructured"
              contentTypes="[text/html]"
              enabled="{Boolean}true"
              generatorType="htmlparser"
              order="0"
              paths="[/content/tda/retail/dbs]"
              serializerType="htmlwriter"
              transformerTypes="[ccvar-transformer]">
        <generator-htmlparser
            jcr:primaryType="nt:unstructured"
            includeTags="[A,/A,DIV,/DIV,SPAN,/SPAN,P,/P,SECTION,/SECTION,H1,/H1,H2,/H2,H3,/H3,H4,/H4,H5,/H5,LI,/LI,BUTTON,/BUTTON]"/>
    </jcr:root>
  5. Do you have any other customization on your AEM instance? - No
Level 2
March 14, 2022

Do you see any errors in the log? Could please also confirm that you are testing ccvar functionality under this content path /content/tda/retail/dbs, and that your component contains tags from includedTags set. Can you try to change paths from /content/tda/retail/dbs to /content and use OOTB we-retail page and components to see if this will work?

 

One last thing you could check is to completely remove your project from AEM, and create all required configuration directly from crx. This could answer the question if this will work on your side on clear AEM 6.5.11 instance with ACS Commons only - and required config - if so than potential issue could sit in your application.


Hi @lukasz-m I am able to configure the above functionality in my project. But i am facing an issue on content side. 

The path is /content/tda/retail/dbs.

whenever i am trying the implement the above functionality on the above given path, it dosent work, but whenever i am changing the name suppose from dbs to mydbswebsite, it works fine. Could you please help me out here. Is there any cache issue, if yes, whether does the cache gets stored?