After updating AEM 6.5.10 underscore dependency is not loading. | Community
Skip to main content
Level 2
October 6, 2021
Solved

After updating AEM 6.5.10 underscore dependency is not loading.

  • October 6, 2021
  • 4 replies
  • 9252 views

We have created a custom RTE component for linking the test to different links depending on the requirement.

So we have created a one extra pop-up on RTE. So for this we have created a js file. In this javascript we also have used underscore js and using for ex  _.isEmpty function. Now after AEM 6.5.10 upgrade it always says "_ is" not defined.

 

We have underscore as a dependency for out clientlibs. This was working with 6.5.5 but after 6.5.10 its not working.

 

I see one difference here is 

6.5.5 this lodash contains modern folder with categories lodash, underscore.

 

Now after 6.5.10 this modern folder is missing so these categories are missing.

 

So is this the reason underscore depedency that was added to out existing component is not getting recognised?

 

Thanks,

Mahaboob,

Best answer by KavithaSubbiah

Hi @mahaboob,

 

Try updating your RTE clientlib dependencies from underscore to lodash.underscore

 

Regards

Kavitha

4 replies

tulasi909
October 6, 2021

Hi , 

 

I am also facing same issue after installing new service pack.

Kiran_Vedantam
Community Advisor
Community Advisor
October 6, 2021

Hi @mahaboob 

 

You can find the release notes here for 6.5.10: https://experienceleague.adobe.com/docs/experience-manager-65/release-notes/service-pack/sp-release-notes.html#release-information

 

Also you can raise an issue here:https://adminconsole.adobe.com/

Related article:

https://experienceleague.adobe.com/docs/customer-one/using/home.html?lang=en#submit-ticket

 

@kautuk_sahni Can you please check with the internal team on this and confirm?

 

Thanks,

Kiran Vedantam.

KavithaSubbiahAccepted solution
October 20, 2021

Hi @mahaboob,

 

Try updating your RTE clientlib dependencies from underscore to lodash.underscore

 

Regards

Kavitha

Level 6
August 30, 2022

thanks, Great, that worked.

Adobe Employee
December 20, 2021

Hi @mahaboob 

Lodash/underscore was deprecated in AEM 6.4.  It must have finally been removed in 6.5.10.

https://experienceleague.adobe.com/docs/experience-manager-64/release-notes/deprecated-removed-features.html?lang=en

 

DevelopersLodash/underscore client library. Adobe does not plan to further maintain and update the Lodash/underscore client library that is shipped as part of the distribution (Quickstart)Adobe recommends customers that still require Lodash/underscore for their code to add it into their project code base.
Level 6
August 29, 2022

Hi folks,

I have this problem also. I don't have visibility of Prod crx/de so I don't know what exactly is there after the upgrade to 6.5.12.

 

I'm confused about the solution. Should I

1. Change clientlib dependencies [underscore] to [lodash.underscore] wherever I find them in my code

and hope that lodash.underscore library is there.

 

or

 

2.

 

If I do something like,

aem.ui.apps/src/main/content/jcr_root/apps/myproj/clientlibs/underscore

with a directory

js/underscore.js

js.txt -> with "#base=js " and "underscore.js"

.content.xml with

 

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:ClientLibraryFolder"
allowProxy="{Boolean}true"
categories="[underscore]"/>

 

thanks

Fiona

Level 6
August 30, 2022

In the end, in my .content.xml files, I put lodash.underscore instead of underscore and that worked to fix my Dialog errors.  "underscore" must have been removed in 6.5.10 but lodash.underscore is still there.

Jineet_Vora
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
March 20, 2024

With ever changing AEM (with service packs), the dependency for underscore could be either lodash.underscore or cq.underscore

 

With AEM 6.5.19, the dependency it is working with is cq.underscore

To make it future proof, you can use your extract this js file and then refer it explicitly. Again, this can have some effects if this same library is loaded/used somewhere else causing multiple invocations. So this needs to be tested.

Level 2
July 4, 2024

Hi @4244688  Style Picker in RTE is not showing up the dropdown values from options.js in AEM after service Pack 6.5.21  upgrade.

I tried using Both lodash.underscore and cq.underscore in nothing is resolving the issue...

 

Jineet_Vora
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
July 4, 2024

@mahesh_kumarpo - Check the console errors. If the errors are pointing to the missing dependency, I assume AEM has stopped shipping this dependency.

As far as I know, there are about a few functions which rely on underscore library. You can write those functions in jQuery and get rid of underscore completely.

functions include _isEmpty(), _isUndefined(), ._defer() to name a few.