Expand my Community achievements bar.

SOLVED

ContextHub experiences not showing on AEM 6.2 Publish instance

Avatar

Level 2

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?

1 Accepted Solution

Avatar

Correct answer by
Level 2

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

View solution in original post

6 Replies

Avatar

Level 9

Hi @konathalasuren,

Make sure to replicate the experiences, offer also.

Thanks,

Avatar

Level 2

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?

Avatar

Level 2

Here's a summary screenshot of the issue..

personalization-summary.png

Avatar

Correct answer by
Level 2

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

Avatar

Level 2

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

Avatar

Level 1

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.