jQuery is not defined | Community
Skip to main content
twoLait
New Participant
Mar 2, 2019 3:25 PM UTC
Solved

jQuery is not defined

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.
Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
Mar 3, 2019 12:29 AM UTC

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

twoLait
twoLaitAuthor
New Participant
Mar 17, 2019 11:49 PM UTC

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.

Translate
Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
Mar 3, 2019 12:29 AM UTC

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?  

Translate
smacdonald2008
Level 10
Mar 2, 2019 8:24 PM UTC

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 

Translate