AEM 6.4 contexthub not loading via dispatcher | Community
Skip to main content
maheswarim77225
Level 2
February 25, 2019
Solved

AEM 6.4 contexthub not loading via dispatcher

  • February 25, 2019
  • 6 replies
  • 3547 views

Hi All,

we are in process of setting up contexthub in AEM 6.4. In our page component's head.jsp, we have included the contexthub component as below

<sling:include path="contexthub" resourceType="granite/contexthub/components/contexthub" />

contexthub configurations and segments are placed inside the /conf path as per the repository restructuring guidelines. Contexthub is loading fine both author and publish instances and segments are also resolving properly.

But when we try to access the page via dispatcher,  contexthub itself is not loading. To debug this issue, we overlayed contexthub component in /apps and added few logs. With this debug, we came to know that the call to

contexthub.isConfigured(slingRequest);

is returning false, only while trying to access via the dispatcher, hence the contexthub related scripts are not getting loaded. Not sure what we are missing.

Has anyone faced similar issue? Any help is appreciated.

Note: At the dispatcher level, we have added allow filter for both /etc/cloudsettings/* as well as /conf/*

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 maheswarim77225

We found the resolution for this issue. we did the repository restructuring as per the below link.

Adobe Experience Manager Help | Common Repository Restructuring in AEM 6.4

However, missed the following step of configuring  page property as per the url

AEM Sites page hierarchies via AEM Sites > Page > Page Properties > Advanced Tab > Cloud Configuration.

After adding this, contexthub started loading and segments are resolving properly.

6 replies

Gaurav-Behl
Level 10
February 25, 2019

check if this helps - Offers / experiences not visible on Publish instance using contexthub for personalization on AEM 6.2 - Stack Overflow

Suren has mentioned the solution for code/dispatcher in that article -

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

smacdonald2008
Level 10
February 25, 2019

I am checking internally to see if there is an issue with ContextHub and Dispatcher or if this could be a configuration issue.

maheswarim77225
Level 2
February 26, 2019

Hi Gaurav,

Thanks for your response.

we are in AEM 6.4. So our segments & contexthub configurations are all under /conf path. Still we have allowed access "/etc/cloudsettings/*"  as well via dispatcher.

smacdonald2008
Level 10
February 26, 2019

ContextHub is not a tool used on Pub. Do you have Dispatcher setup in front of Author instance?

smacdonald2008
Level 10
February 26, 2019

Checked with my AEM co-workers. COntextHub should not be used on PUB. They replied:

Not the include, no. That would be suppressed any way in publish mode

Therefore, when used on Author instance - there is no need to go through Dispatcher.

maheswarim77225
maheswarim77225AuthorAccepted solution
Level 2
February 28, 2019

We found the resolution for this issue. we did the repository restructuring as per the below link.

Adobe Experience Manager Help | Common Repository Restructuring in AEM 6.4

However, missed the following step of configuring  page property as per the url

AEM Sites page hierarchies via AEM Sites > Page > Page Properties > Advanced Tab > Cloud Configuration.

After adding this, contexthub started loading and segments are resolving properly.

Level 3
August 16, 2021

HI @maheswarim77225 ,

This is legacy kernel JS ( /etc/cloudsettings.kernel.js/libs/settings/cloudsettings/legacy/contexthub) which is pointing to /apps/settings/cloudsettings/legacy/contexthub.kernel.js. So better you can add rewrite rule in Dispatcher vhosts.d for above one along with whitelisting allow for /apps folder in dispatcher.d file to cache this file on Dispatcher side.

 

Note: You can have same rewrite rules entries for below new context hub if you are using 

/etc/cloudsettings.kernel.js/conf/yoursite/settings/cloudsettings/contexthub-configuration/contexthub

to /conf/yoursite/settings/cloudsettings/contexthub-configuration/contexthub.kernel.js