Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS Error because of missing underscore library on AEM SP 6.5.10+ #239

Closed
ncautotest opened this issue Aug 10, 2022 · 2 comments
Closed

JS Error because of missing underscore library on AEM SP 6.5.10+ #239

ncautotest opened this issue Aug 10, 2022 · 2 comments

Comments

@ncautotest
Copy link

As of AEM Service Pack 6.5.10 the underscore js library is no longer included OOTB with AEM and as a result some of the tools are not working anymore.

Example:

Attempting to run a query via Query Editor will throw a JS error in the browser console.

angularjs.ACSHASH799e3a0634ddc406e898b76466d4a9e1.js:92 ReferenceError: _ is not defined
    at params (clientlibs.ACSHASH90274f090122c8701f2d5436ecda2423.js:97:17)
    at $scope.query (clientlibs.ACSHASH90274f090122c8701f2d5436ecda2423.js:108:27)
    at angularjs.ACSHASH799e3a0634ddc406e898b76466d4a9e1.js:177:3
    at angularjs.ACSHASH799e3a0634ddc406e898b76466d4a9e1.js:194:165
    at k.$eval (angularjs.ACSHASH799e3a0634ddc406e898b76466d4a9e1.js:112:68)
    at k.$apply (angularjs.ACSHASH799e3a0634ddc406e898b76466d4a9e1.js:112:346)
    at HTMLButtonElement.<anonymous> (angularjs.ACSHASH799e3a0634ddc406e898b76466d4a9e1.js:194:147)
    at HTMLButtonElement.dispatch (jquery.ACSHASH1fc733054ddb2e2fcd4a0f763671047b.js:5232:27)
    at elemData.handle (jquery.ACSHASH1fc733054ddb2e2fcd4a0f763671047b.js:4884:28)
@ncautotest ncautotest changed the title JS Error because of missing underscore library JS Error because of missing underscore library on AEM SP 6.5.10+ Aug 10, 2022
@ncautotest
Copy link
Author

ncautotest commented Aug 10, 2022

A quick and dirty fix is to add in the query-editor.jsp the following in the <head> tag:

<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.4/underscore-min.js"></script>

Probably a better fix would be replace usage of _ with equivalent native or angularjs calls.

@ncautotest
Copy link
Author

marking as duplicate of #234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant