AEM 6.4 contexthub not loading via dispatcher

maheswarim77225

25-02-2019

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/*

Accepted Solutions (1)

Accepted Solutions (1)

maheswarim77225

28-02-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.

Answers (5)

Answers (5)

smacdonald2008

26-02-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

26-02-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.