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!
Solved! Go to Solution.
Yes, see the HELPX article where Context hub appears:
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.
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…
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.
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
The article works. I missed out adding granite.utils and granite.jquery dependencies to my clientlibs. Its working fine now.
Thanks a lot!
In case someone is facing this issue for editable template - it worked when dependency to granite.csrf.standalone is also added.