Skip to content

Naming collision in Javascript ui registry (backend) #12555

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

Closed
EliasZ opened this issue Dec 6, 2017 · 6 comments
Closed

Naming collision in Javascript ui registry (backend) #12555

EliasZ opened this issue Dec 6, 2017 · 6 comments
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@EliasZ
Copy link
Contributor

EliasZ commented Dec 6, 2017

Preconditions

Magento 2.2.1

Steps to reproduce

Add a configurable attribute with attribute code set as "content", or any other name which exists as identifier on the product edit page (for example, "gallery", "review" ,"related").

Add it to the default attribute set

Edit a product.

Expected result

  1. You can properly edit/save the product and add configurations setting that attribute.

Actual result

  1. All kinds of Javascript issues arise when trying to save the product

This is because somehow most HTML elements end up in a registry and are then retrieved on various places. For example:

Magento/ConfigurableProduct/view/adminhtml/web/js/variations/variations.js:365

So when using the name "content" for an attribute, instead of the "content" attribute input, it retrieves the "content" fieldset on the product edit page. This gives a variety of javascript errors such as Element.disabled is not a function.

Could not find where exactly the uiRegistry is filled, but wherever it is the names are not unique enough.

See for example someone else who encountered this problem: Magento 2 - “Element.disabled is not a function” Attribute Error

@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Dec 6, 2017
@magento-engcom-team
Copy link
Contributor

@EliasZ, thank you for your report.
We've created internal ticket(s) MAGETWO-85179 to track progress on the issue.

@VladimirZaets
Copy link
Contributor

@EliasZ Hi, the fix for this issue will be delivered to Magento 2.3 version. You can look the commit with a fix in PR #12943.

@magento-team magento-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Jan 3, 2018
@magento-team
Copy link
Contributor

Hi @EliasZ. Thank you for your report.
The issue has been fixed in #12945 by @VladimirZaets in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming patch release.

@magento-team
Copy link
Contributor

Hi @EliasZ. Thank you for your report.
The issue has been fixed in #12943 by @VladimirZaets in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming patch release.

@magento-team magento-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Jan 3, 2018
@peterjaap
Copy link
Contributor

Addition; this also happens for attribute named 'design'.

@templatetuners
Copy link

Addition; this also happens for attribute named 'design'.

@peterjaap how did you fix this? I have created path to app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/ and copied the latest variations.js there, but still same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

7 participants