Expand my Community achievements bar.

Jquery, Granite etc. not resolved after upgrade from AEM 6.1 to 6.4

Avatar

Adobe Champion

Hi All,

After doing an upgrade from AEM 6.1 to 6.4, in 6.4 pages we are getting errors in the console like Granite is not defined, $CQ is not defined, $(...).ready(...) is not a function, Cannot read property 'namespace' of undefined etc. which is impacting various functionalities on the page.

Let me know if any clientlibs or config we need to change to be able to resolve these objects? 

embed="[jquery,lodash,granite.utils,granite.jquery,cq.jquery,granite.shared,cq.shared

We are using this in clientlibs embed from our 6.1 code, but seems they having an issue with 6.4.

If anyone faced this issue and got the fix, please let me know of the same.

Regards

1 Reply

Avatar

Level 10

This issue could probably be related to jQuery versions conflict; your project's custom jQuery version vs AEM6.4's OOB jQuery version.

Couple of pointers:

  • Use debugging points to iron out what versions and methods of jQuery are available
  • Check if jQuery is loading when it is supposed to load i.e. before invoking any method on it
  • Check (& modify, if applicable) the sequence (onReady vs DOM load) and order of libraries getting loaded on the page
  • Check if any redundant libraries are getting loaded
  • Check if your code is using specific embeds which in-turn have which are causing this issue - isolate the issue and add libraries one by one