Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

ContextHub problem with 6.4 Service Pack 4

Avatar

Avatar
Validate 1
Level 2
fernandou237618
Level 2

Likes

7 likes

Total Posts

19 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 2
fernandou237618
Level 2

Likes

7 likes

Total Posts

19 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 5
Boost 3
View profile
fernandou237618
Level 2

05-09-2019

Hello,

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)

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 2
fernandou237618
Level 2

Likes

7 likes

Total Posts

19 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 2
fernandou237618
Level 2

Likes

7 likes

Total Posts

19 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 5
Boost 3
View profile
fernandou237618
Level 2

25-09-2019

Hi guys,

I finally found the cause and a solution for the problem.

I don't know why, but the guys here (programmers) have used the keyword "let" in some Javascript code ("let" was introduced in ECMAScript 6).

It was working fine before SP4, but a simple change in our code to "var", making the code complaint with old Javascript versions, solved the problem.

The code was in a custom implementation of a Store, inside the following JS file:

/apps/myproject/components/contexthub/stores/mycustomstore/store.mycustomstore.js

Answers (7)

Answers (7)

Avatar

Avatar
Validate 1
Level 1
Romain_Blineau
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
Romain_Blineau
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
Romain_Blineau
Level 1

12-11-2019

Our application is relying heavily on ECMAscript 6 but we believe this is not the common error that triggers this javascript error. To solve it, we loaded the following clientlib in our component customerheaderlib.html

Avatar

Avatar
Validate 1
Level 2
fernandou237618
Level 2

Likes

7 likes

Total Posts

19 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 2
fernandou237618
Level 2

Likes

7 likes

Total Posts

19 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 5
Boost 3
View profile
fernandou237618
Level 2

25-09-2019

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 [1569436104123] 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.

Avatar

Avatar
Validate 1
Level 2
fernandou237618
Level 2

Likes

7 likes

Total Posts

19 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 2
fernandou237618
Level 2

Likes

7 likes

Total Posts

19 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 5
Boost 3
View profile
fernandou237618
Level 2

25-09-2019

Hi dhaliwal,

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.

Avatar

Avatar
Give Back 50
Employee
Vish_dhaliwal
Employee

Likes

189 likes

Total Posts

356 posts

Correct Reply

123 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
Vish_dhaliwal
Employee

Likes

189 likes

Total Posts

356 posts

Correct Reply

123 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Vish_dhaliwal
Employee

06-09-2019

Hello,

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?

Regards,

Vishu

Avatar

Avatar
Validate 1
Level 2
fernandou237618
Level 2

Likes

7 likes

Total Posts

19 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 2
fernandou237618
Level 2

Likes

7 likes

Total Posts

19 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 5
Boost 3
View profile
fernandou237618
Level 2

06-09-2019

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:

- granite.query

- granite.utils

- cq.jquery

- cq.wcm.foundation

- cq.wcm.foundation-main

It works correctly under no-SP, SP1, SP2 and SP3.

Avatar

Avatar
Give Back 5
Level 4
Bharath_valse
Level 4

Likes

34 likes

Total Posts

65 posts

Correct Reply

11 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile

Avatar
Give Back 5
Level 4
Bharath_valse
Level 4

Likes

34 likes

Total Posts

65 posts

Correct Reply

11 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile
Bharath_valse
Level 4

05-09-2019

As part of 6.4.4.0 release notes [0], 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

[0]

AEM 6.4 Service Pack Release Notes

Avatar

Avatar
Give Back 50
Employee
berliant
Employee

Likes

207 likes

Total Posts

315 posts

Correct Reply

98 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
berliant
Employee

Likes

207 likes

Total Posts

315 posts

Correct Reply

98 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
berliant
Employee

05-09-2019

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