Error while adding ContextHub to the page component | Community
Skip to main content
saumyaj49332255
Level 2
September 19, 2017
Solved

Error while adding ContextHub to the page component

  • September 19, 2017
  • 5 replies
  • 4232 views

down votefavorite

Hi,

We have used Context Hub Parameters on Adobe Target Framework within Adobe Target cloud configuration.

However, when we have add the following line to add ContextHub to our page component:

<sly data-sly-resource="${'contexthub' @ resourceType='granite/contexthub/components/contexthub'}"/>

I am getting error on the console as shown below: enter image description here

I tried resolving this but the effort was in vain.

Can anyone help me regarding this ?

Do we need to add some dependency for ContextHub in our clientlibs?

Thanks !

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 saumyaj49332255

Got the problem solved.

We need to add embed property in our clientlibs with these values:

1. jquery

2. granite.utils

3. granite.jquery

4. cq.jquery

5. cq.wcm.foundation

6. cq.wcm.foundation-main

Thanks !

5 replies

kautuk_sahni
Community Manager
Community Manager
September 19, 2017

Can you increase the limit of org.apache.sling.engine.impl.SlingMainServlet (/system/console/configMgr under "Apache Sling Main Servlet) ->sling.max.calls=1000 to 2000/6000/15K+ (try all 3, 1 by 1). The intent of having this was to limit the number of nested/recursive calls.

Reference :-

1. https://mail-archives.apache.org/mod_mbox/sling-users/201202.mbox/%3C4A309956-28F4-4080-88A8-4B447C188BF7@adobe.com%3E

~kautuk

Kautuk Sahni
saumyaj49332255
Level 2
September 19, 2017

I tried with your solution, but it didnt work either.

saumyaj49332255
saumyaj49332255AuthorAccepted solution
Level 2
September 19, 2017

Got the problem solved.

We need to add embed property in our clientlibs with these values:

1. jquery

2. granite.utils

3. granite.jquery

4. cq.jquery

5. cq.wcm.foundation

6. cq.wcm.foundation-main

Thanks !

smacdonald2008
Level 10
September 19, 2017

Thank for you for posting. For those reading this thread and wanting to know how to get ContextHib into an AEM page -- see this artilce:

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

narindera257447
Level 2
July 18, 2019

Follow the url Uncaught TypeError: Cannot read property 'externalize' of undefined · Issue #107 · adobe/aem-project-archetype · GitHub

and add the below in your header lib file

<!--/* Include Context Hub */-->
<sly data-sly-call="${clientlib.js @ categories='granite.utils'}"/>
<sly data-sly-resource="${'contexthub' @ resourceType='granite/contexthub/components/contexthub'}"/>