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

ACS Commons 5.1.2 | Composite Multifield and Loadash behaviour #2821

Closed
nehmalho opened this issue Apr 9, 2022 · 9 comments
Closed

ACS Commons 5.1.2 | Composite Multifield and Loadash behaviour #2821

nehmalho opened this issue Apr 9, 2022 · 9 comments
Assignees
Milestone

Comments

@nehmalho
Copy link

nehmalho commented Apr 9, 2022

After installing ACS commons 5.1.2, we are facing 2 issues. AEM Version 6.5 SP10

ISSUE : We are using an ACS AEM Commons feature called Multifield Extension for building nested multifield widgets in Touch-UI dialogs. We add the following property acs-commons-nested="" in the dialog definition on the multifiled widget node or below it.

The multifield widgets in our application having nested fields starts to break (Issue while retrieving stored multifield values) after installing 5.1.2.

Temporary fix: JS present under Composite-multifield (/apps/acs-commons/touchui-widgets/composite-multifield) folder in acs-commons folder helps to resolve the issue and restore values in multifield dialog. So we embed this Composite-multifield Category to our code base.

Concern: If ACS is providing this file, then why not adding up this on authoring mode by itself .

Let us know if anyone has any pointers on same.

@ararat
Copy link
Contributor

ararat commented Apr 20, 2022

Would you be able to share the JS changes you implemented?
When you say break, can you elaborate?
Beyond adding the property to the node what else is the process to reproduce?

@nehmalho
Copy link
Author

hi @ararat

The Implementation for fix we have done is just added a multifield-extension-wrapper folder as below:
Category = [cq.authoring.dialog, granite.ui.coral.foundation]
Embed = [acs-commons.lodash, acs-commons.authoring.composite-multifield]

image

When you say break, can you elaborate?
-> When we installed acs commons 5.1.2, and when we edit and save multifield components values are vanished and not retained. So when we open the same components next time it shows empty multifield. No Console till now
Now we create “multifield-extension-wrapper” folder and embed “acs-commons.authoring.composite-multifield” the above issue is resolved , but concern is that if this “acs-commons.authoring.composite-multifield” is present in ACS-commons folder (/apps/acs-commons/touchui-widgets/composite-multifield) so why we need to explicitly add this in wrapper is there anything else which we are missing ?
Here we only embedded only “acs-commons.authoring.composite-multifield” now we get console error as below

image

So we embedded “acs-commons.lodash” and this console error stopped appearing and even multifield component started working properly.

@wrandall22
Copy link

I have also encountered this issue. Basically the problem is that /apps/acs-commons/touchui-widgets/composite-multifield is dependent upon underscore which no longer exists in AEM 6.5. The old clientlib that lived under this category was underscore version 2.4.1, which is the same one you have embedded in your workaround with category acs-commons.lodash (which ACS commons ships itself). It seems to me the proper fix would be for /apps/acs-commons/touchui-widgets/composite-multifield to depend upon this instead of the non-existent underscore category.

@kwin
Copy link
Contributor

kwin commented Apr 21, 2022

@wrandall22 Can you provide a PR?

@wrandall22
Copy link

Can I get rights? I don't have push rights yet.

@kwin
Copy link
Contributor

kwin commented Apr 21, 2022

You don’t need to have those, look at https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/CONTRIBUTING.md#how-to-contribute-code

@ararat
Copy link
Contributor

ararat commented Apr 22, 2022

@wrandall22 can you check my PR #2828

@kmajo1989
Copy link

Is there any update on this? As, I am also facing the same error. But, unfortunately the temporary fix is not working for me.

@kwin kwin closed this as completed Jun 22, 2022
@nehmalho
Copy link
Author

hi @kwin @ararat - kindly update which acs commons version we can check this as fixed.

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

No branches or pull requests

6 participants