ContextHub experiences not showing on AEM 6.2 Publish instance | Community
Skip to main content
Level 2
Jun 25, 2017 6:55 AM UTC
Solved

ContextHub experiences not showing on AEM 6.2 Publish instance

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.
konathalasurenAccepted solution
Level 2
Jun 29, 2017 11:05 PM UTC

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

New Participant
Sep 24, 2019 10:55 PM UTC

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.

Translate
Level 2
Mar 14, 2019 1:14 PM UTC

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*" }

Translate
konathalasurenAuthorAccepted solution
Level 2
Jun 29, 2017 11:05 PM UTC

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*" }

Translate
Level 2
Jun 27, 2017 4:01 AM UTC

Here's a summary screenshot of the issue..

Translate
Level 2
Jun 26, 2017 5:39 PM UTC

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?

Translate
MC_Stuff
Level 10
Jun 26, 2017 5:47 AM UTC

Hi @konathalasuren,

Make sure to replicate the experiences, offer also.

Thanks,

Translate