We have just installed Service Pack 4 in our servers and ContextHub is now failing to show Ui Modes.
We are getting this error in the Chrome console, while trying to edit a Segment (Audience):
Uncaught TypeError: window.injectContextHubUI is not a function
The segmentation is not working at all within our pages, and the segmentation toolbar is also not being displayed while previewing content.
Anyone knows a solution for this?
(Edited: by the way, I am migrating from 6.4 SP3)
I finally found the cause and a solution for the problem.
The code was in a custom implementation of a Store, inside the following JS file:
Looking up in the error logs, the only thing that I could see is this error:
==> error.log <==
25.09.2019 15:28:24.189 *WARN* [0:0:0:0:0:0:0:1  GET /editor.html/conf/myproject/settings/wcm/segments/novo.html HTTP/1.1] org.apache.sling.caconfig.resource.impl.def.DefaultConfigurationResourceResolvingStrategy Ignoring reference to /conf/myproject/settings from /conf/myproject/settings - Probably misconfigured as it ends with '/settings'
I don't know if it relates to the Contexthub problem.
You are right, the We.Retail uses the default ContextHub Path and Segments Path.
If I change my project to use the default ones (like in We Retail) then the segmentation toolbar displays correctly while editing Audience (Segments) and also while authoring my Pages.
But in our case, we are using custom Ui Modes. We need to change those paths in page/audience configuration.
I do not see any issue with the editing of Audiences or loading of we-retail contexthub in 6.4 Sp4.
However, there is another issue with the /etc/cloudsettings.styles.css/libs/settings/cloudsettings/legacy/contexthub request throwing 500 intermittently which is resolved in Sp6 (NPR-29946).
Is there any error in the logs?
Hi Guys, I am still not able to use ContextHub with AEM 6.4 SP4.
I have tried to load various clientlibs, including the following:
It works correctly under no-SP, SP1, SP2 and SP3.
As part of 22.214.171.124 release notes , there was an update to Jquery library. you might want to check if there isn't a conflict in jquery libraries.
Note from release notes:
Migrate contexthub to jquery 3. NPR-28397: Hotfix for GRANITE-19902
You need to make sure that ContentHub was included to a Page Component: Setup ContextHub
Also, you can try to recompile clientlibs: How to force a recompilation of all Sling scripts jsps, java, and sightly in AEM 6.4