jQuery is not defined | Community
Skip to main content
twoLait
March 2, 2019
Solved

jQuery is not defined

  • March 2, 2019
  • 3 replies
  • 4703 views

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.

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 Gaurav-Behl

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?  

3 replies

smacdonald2008
Level 10
March 2, 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 QueryBuilder API 

Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
March 3, 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?  

twoLait
twoLaitAuthor
March 17, 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.