jQuery is not defined

twoLait 02-03-2019

Hello to this great community,

I have a fresh aem 6.4 plus corresponding service pack up and running and everything seems to be working properly, except for this  Uncaught ReferenceError: jQuery is not defined coming from utils.js:375 which corresponds to some core code.

I am just trying to see ahead and avoid possible future issues so, could someone please share any knowledge of how get rid of this console error.

Accepted Solutions (1)

Accepted Solutions (1)

gauravb41175071
MVP
02-03-2019

Did you mean that the error is in AEM 6.4 OOB and not your custom code?  If its your custom code then use 'cq.jquery' dependency as Scott mentioned above

If you observed in error in OOB code then could you

- share the url that you tested?

- share the browser you used to test?

- try in multiple browsers?

- try to reproduce in we-retail, if applicable?

- share appropriate screenshots?  

Answers (2)

Answers (2)

twoLait 17-03-2019

The inclusion of <sly data-sly-resource="${'contexthub' @ resourceType='granite/contexthub/components/contexthub'}"/> is what causes the error; I followed the weretail clientlibs structure but with no luck.

Nevertheless the issue is not affecting anything that depends on jQuery.

smacdonald2008 02-03-2019

AEM comes OOTB with a JQuery version.

Make sure that the JQuery Lib is part of AEM. One way you can test this is to create a custom component with a client lib and see if you can add a clientlib with a property where dependencies is cq.jquery.

See this AEM HELPX article - where is use this property.

Adobe Experience Manager Help | Querying Adobe Experience Manager 6.4 JCR data using the QueryBuilde...