Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

Avatar

Level 2

Hi,

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

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.

7 Replies

Avatar

Community Advisor

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?

Avatar

Level 2

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

Avatar

Community Advisor

@sinshi1308, thanks for sharing the details. In general it looks fine, you should remove duplicated

<?xml version="1.0" encoding="UTF-8"?>

from your rewriter configuration. Nevertheless I was able to use your configuration successfully on ACS Commons 5.1.0.

Could you please share screen shot of crx tree that will present location of your PropertyAggregatorServiceImpl and rewriter. Ideally it should present expanded /apps tree that will include path to place where you are storing your xmls with OSGi and rewriter configuration.

This is how it looks on my local instance.

crx-ccvar-conf.png

Avatar

Level 2

This is how it all looks. It matches everything that you have commented above. But whenever i am trying to call ((page_properties.jcr:title)) in my component while authoring , I am not getting the desired results.

Location for PropertyAggregaterImplLocation for PropertyAggregaterImplHow it looks like in config consoleHow it looks like in config consolerewriter stausrewriter staus

Avatar

Community Advisor

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.

Avatar

Level 2

Hi @lukasz-m 

I do not see any errors in my log. Let me try the above method by removing my project from AEM, and creating all required configuration directly from crx and see if it works or not. All my components contains tags from includedTags set.  

Avatar

Level 2

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?