Uncaught ReferenceError: CQ is not defined

Avatar

Avatar

maheraj

Avatar

maheraj

maheraj

05-12-2017

Hi there,

I am upgraded from AEM 6.0 to  AEM 6.2. There was some changes required and I have done those. Everything was fine. Recently I have upgraded CFP8. After that I am getting Uncaught ReferenceError: CQ is not defined in browser console in every page. I am getting this error in both author and publish instance. Here is the QA publish server of my application: Cheap Rental Cars and Car Rental Deals Worldwide - Fox Rent A Car.

Can you please help me to resolve this issue?

Here is my current instance version:

Adobe Experience Manager, Version 6.2.0.SP1-CFP8

Here is the browser console error:

Uncaught ReferenceError: CQ is not defined

     at main.js:97

Replies

Avatar

Avatar

abhishekagg19

Employee

Avatar

abhishekagg19

Employee

abhishekagg19
Employee

06-12-2017

Make sure cq.widgets is added as dependency in your client lib.

dependenciesString[]cq.widgets

Avatar

Avatar

maheraj

Avatar

maheraj

maheraj

06-12-2017

This is the path of my client libs folder this my my client lib folder: /etc/designs/dotcom/clientlibs_base . And I have added the dependencies. Still issue is there.

Avatar

Avatar

abhishekagg19

Employee

Avatar

abhishekagg19

Employee

abhishekagg19
Employee

06-12-2017

Error is reported from main.js (loaded on top of the page)

And clientlibs_base.js is loaded at the end of the page. You might need to look into ordering of the client libraries in which they are included in the page.

Avatar

Avatar

maheraj

Avatar

maheraj

maheraj

06-12-2017

I have compared 6.0 vs 6.2. Order is same. It was working in 6.2 before installing CFP8.

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

06-12-2017

I ahve checked with internal ppl to see if this is a known issue.

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

06-12-2017

By the way - nice site. If you ever want to contribute some community code that help the AEM DEV community - let us know.

Avatar

Avatar

maheraj

Avatar

maheraj

maheraj

06-12-2017

I need to resolve this issue. This issue is blocking my next release. If you can help me on this it will be great. Thank you.

Yes, I shall be glad to contribute some community code. Thank for the complement.

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

06-12-2017

I have never seen this issue nor do we have any webinars or task-based doc that i can point you to in order to resolve this.

However - there is a related thread here: cq5 - Uncaught ReferenceError: CQ is not defined - Stack Overflow

If this does not resolve it and you do not hear back from a community member - i strongly recommend opening a ticket as there may be a bug somewhere.

Avatar

Avatar

maheraj

Avatar

maheraj

maheraj

06-12-2017

I have tried this solution already. Thank you for your suggestion. I am going to file a ticket in Day Care as I have very limited time to resolve this. Thanks again.