Expand my Community achievements bar.

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

After updating AEM 6.5.10 underscore dependency is not loading.

Avatar

Level 2

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 

mahaboob_0-1633507897728.png

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.

mahaboob_1-1633508049711.png

 

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

 

Thanks,

Mahaboob,

1 Accepted Solution

Avatar

Correct answer by
Level 1

Hi @mahaboob,

 

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

 

Regards

Kavitha

View solution in original post

10 Replies

Avatar

Level 1

Hi , 

 

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

Avatar

Community Advisor

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

 

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.

Avatar

Correct answer by
Level 1

Hi @mahaboob,

 

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

 

Regards

Kavitha

Avatar

Level 1

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

 

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.

Avatar

Level 7

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

Avatar

Level 7

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.

Avatar

Community Advisor

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.

Avatar

Level 2

Hi @JINJIN  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...

Mahesh_kumarPo_0-1720082273390.png

Mahesh_kumarPo_1-1720082839805.png

 

Avatar

Community Advisor

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