ContextHub experiences not showing on AEM 6.2 Publish instance | Community
Skip to main content
Level 2
June 25, 2017
Solved

ContextHub experiences not showing on AEM 6.2 Publish instance

  • June 25, 2017
  • 6 replies
  • 5462 views

I've done as specified in https://docs.adobe.com/docs/en/aem/6-2/author/personalization/content-targeting-touch.html and i'm abel to see the experiences in Author mode, but when i'm using "View as Published" or on Publish instance (after Publishing the page), the targeted components do not show up. Not even the default.  WE have a Dispatcher, also checked the permissions to allow personalization ( /libs/cq/personalization ) are set.

Few observations:

  • We are using sightly and our code is located at /apps/ups-aem/components/page. The offer information is saved at /content/campaigns/ups
  • On Author i can see the Audience traits under /etc/segmentation/contexthub/my-audience but the same is not there on Publish instance. I'm assuming this will be published along with the page, but is not happening.
  • If the logged-in user does not have permission to /content/campaigns then i see this error in the logs. If i give permissions then i do not see. Can i assume the component is loading?
    2017 03:01:22.427 *WARN* [192.150.10.207 [1498374082395] GET /content/brand/en-us/emp.html HTTP/1.1] com.day.cq.personalization.impl.AreaServiceImpl Area at /content/campaigns/ups/master not found or not accessible.

What am i missing?

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

I found the solution to the problem and adding it here for reference:

The default experiences shows with the below changes:

  • Changed the code from using this:

        <sly data-sly-test="${!wcmmode.disabled}">

           <div data-sly-call="${clientLib.all @ categories='personalization.kernel'}" data-sly-unwrap></div>

           <div data-sly-resource="${'config' @ resourceType='cq/personalization/components/clientcontext_optimized/config'}" data-sly-unwrap></div>

           <div data-sly-resource="${'contexthub' @ resourceType='granite/contexthub/components/contexthub'}" data-sly-unwrap></div>

        </sly>

        <sly data-sly-test="${!wcmmode.disabled}">

           <div data-sly-include="/libs/cq/cloudserviceconfigs/components/servicelibs/servicelibs.jsp" data-sly-unwrap></div>

           <meta data-sly-call="${clientLib.all @ categories='cq.apps.targeting'}" data-sly-unwrap></meta>

        </sly>

       To just this:

        <sly data-sly-resource="${'contexthub' @ resourceType='granite/contexthub/components/contexthub'}"/>

  • Enabled the below urls in the Dispatcher's publish-farm.any

       /0036 { /type "allow" /url "/etc/cloudsettings*" }

       /0037 { /type "allow" /url "/etc/segmentation*" }

6 replies

MC_Stuff
Level 10
June 26, 2017

Hi @konathalasuren,

Make sure to replicate the experiences, offer also.

Thanks,

Level 2
June 26, 2017

Yes i published all , expect one i can observe..

On author i can see my Audience under "etc/segmentation/contexthub" but not under Publish. How can i publish them?

Level 2
June 27, 2017

Here's a summary screenshot of the issue..

konathalasurenAuthorAccepted solution
Level 2
June 29, 2017

I found the solution to the problem and adding it here for reference:

The default experiences shows with the below changes:

  • Changed the code from using this:

        <sly data-sly-test="${!wcmmode.disabled}">

           <div data-sly-call="${clientLib.all @ categories='personalization.kernel'}" data-sly-unwrap></div>

           <div data-sly-resource="${'config' @ resourceType='cq/personalization/components/clientcontext_optimized/config'}" data-sly-unwrap></div>

           <div data-sly-resource="${'contexthub' @ resourceType='granite/contexthub/components/contexthub'}" data-sly-unwrap></div>

        </sly>

        <sly data-sly-test="${!wcmmode.disabled}">

           <div data-sly-include="/libs/cq/cloudserviceconfigs/components/servicelibs/servicelibs.jsp" data-sly-unwrap></div>

           <meta data-sly-call="${clientLib.all @ categories='cq.apps.targeting'}" data-sly-unwrap></meta>

        </sly>

       To just this:

        <sly data-sly-resource="${'contexthub' @ resourceType='granite/contexthub/components/contexthub'}"/>

  • Enabled the below urls in the Dispatcher's publish-farm.any

       /0036 { /type "allow" /url "/etc/cloudsettings*" }

       /0037 { /type "allow" /url "/etc/segmentation*" }

Level 2
March 14, 2019

Hello -

I am facing the same issue in AEM 6.4 instance. I have created experiences for different audiences and it is working fine preview mode of the author. I have published the page and targeted content is not appearing in the publisher instances, when I access the page.

I have added the rules to dispatcher as below and still it is not showing up in publisher instance. Any idea, what else I am missing here.

/0214 { /type "allow" /url "/conf/global/settings/cloudsettings*" }

/0215 { /type "allow" /url "/conf/dotcom-project/settings/wcm/segments*" }

September 24, 2019

I have the same issue on 6.4

I have created experiences for different audiences and it is working fine preview mode of the author. Upon publishing the page, targeted content is not appearing on the publisher.