Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

jQuery is not defined

Avatar

Level 1

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.

1 Accepted Solution

Avatar

Correct answer by
Level 10

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?  

View solution in original post

3 Replies

Avatar

Level 10

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... 

Avatar

Correct answer by
Level 10

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?  

Avatar

Level 1

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.