Contexthub Tool bar issue in AEM 6.3 | Community
Skip to main content
divyak96999766
Level 2
September 12, 2017
Solved

Contexthub Tool bar issue in AEM 6.3

  • September 12, 2017
  • 10 replies
  • 5428 views

Hi All,

While including Contexthub in my custom template, I have added

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

The toolbar appears on custom page (on preview mode) in  AEM 6.2. The same way doesn't work in AEM 6.3, I had to add clientlibs (<cq:includeClientLib categories="contexthub.ui.segment-editor"/>) to get the tool bar appear on the page. but, this is disabling the 'Targeting' option under modes.

Below is the image that illustrates:

But when we remove the same clientlibs, the targeting mode is enabled back (as shown below). Can someone please help me fix this issue, to have both in place?

Thanks in Advance!

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 smacdonald2008

See this HELPX Article - the ContextHub bar appears:

Scott's Digital Community: Using the ContextHub with the Experience Manager Toy Store site

Hope this helps....

10 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
September 12, 2017

See this HELPX Article - the ContextHub bar appears:

Scott's Digital Community: Using the ContextHub with the Experience Manager Toy Store site

Hope this helps....

Ratna_Kumar
Level 10
September 12, 2017
divyak96999766
Level 2
September 12, 2017

On the mere inclusion of contexthub component, the tool bar is not enabled and it was throwing errors which later got resolved on addition of clientlibs. But this clientlibs is disabling the Targeting mode on the page.

I am getting this issue on v6.3 and it works fine in v6.2.

smacdonald2008
Level 10
September 12, 2017

Did you load the example in the Toy Store site - where you can see it working:

smacdonald2008
Level 10
September 12, 2017

I asked one of out internal experts to look here and they stated:

I think this is a core client libraries mismatch and may be coming from the page component itself.

Based on their code <sling:include path="contexthub" resourceType="granite/contexthub/components/contexthub"/>

They are pointing to a JSP page component instead of HTL. Try to convert the page component itself to HTL (the components inside can still be JSP)

Context Hub is systematically replacing Client Context so I don’t think it’s worth the effort to try and find how to keep making a JSP page component work in Granite.

The other added advantage; upgrading your primary page component to HTL will allow you to leverage Content Fragments, Experience Fragments and other new features.

We are not going to update the foundation to my knowledge and using a Classic UI page in the Granite UI is going to have a lot of other problems as well…

divyak96999766
Level 2
September 13, 2017

I tried converting to HTL, and it works neither. I debugged and found there is an issue with

'com.adobe.granite.contexthub.ui.allow-embedding' setting to true. This can probably fix the issue. Do you have any idea on how to set this property? I couldn't find this property in configuration.

smacdonald2008
Level 10
September 13, 2017

Did you load the package in the Toy Store article - it works there. Compare that with your setup.

smacdonald2008
Level 10
September 13, 2017

I justed loaded the 3 packages in that article and ContextHub loaded - see:

Also - we are running Ask the AEM Community Experts on this subject this month - see: Scott's Digital Community: Ask the AEM Community Experts for Sept 2017

divyak96999766
Level 2
September 14, 2017

Hi Scott,

The article works. I missed out adding granite.utils and granite.jquery dependencies to my clientlibs. Its working fine now.

Thanks a lot!

Adobe Employee
September 30, 2019

In case someone is facing this issue for editable template - it worked when dependency to granite.csrf.standalone is also added.