Skip to content

Can't add customizable options to product #11792

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
mikelevy300 opened this issue Oct 26, 2017 · 3 comments
Closed

Can't add customizable options to product #11792

mikelevy300 opened this issue Oct 26, 2017 · 3 comments
Assignees
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

@mikelevy300
Copy link

Preconditions

  1. PHP 7.0.16
  2. MySQL 5.7
  3. Apache 2.4
  4. Magento 2.1.9 (I was able to recreate this w/ both the sample data and the data from my store)

Steps to reproduce

  1. Go into the admin panel and navigate to Stores->Attribute Set
  2. Edit the default attribute set, add a new group named 'Options', add a few attributes to the new group, and save the group
  3. Navigate toe Products->Catalog and choose any product with the default attribute set to edit
  4. Expand the Customizable Options section and click the 'Add Option' button

Expected result

  1. A new customizable option form should appear

Actual result

  1. Nothing happens on the page
  2. A 'Uncaught TypeError: Cannot read property 'apply' of undefined' error is thrown in the console

The full stack trace for the console error is:

Uncaught TypeError: Cannot read property 'apply' of undefined
at registry.js:54
at Registry._resolveRequest (registry.js:413)
at Registry._addRequest (registry.js:380)
at Registry.get (registry.js:224)
at async (registry.js:53)
at UiClass.applyAction (button.js:72)
at Array.forEach ()
at UiClass.action (button.js:50)
at HTMLButtonElement. (knockout.js:3863)
at HTMLButtonElement.dispatch (jquery.js:5226)

I traced it out and what is happening is there are two UIClass objects on the page with the same 'ns'=>'product_form' and 'index'=>'options' properties. This is occurring because the 'Options' attribute group we just created was given the attribute group code 'options' and that attribute group code appears to be the value that's used for the 'index' key in the resulting UIClass object. If we go back and delete the 'Options' group out of the attribute set, the button goes back to working like it should. I also tested out just renaming the group; however, it appears that the attribute group code is only set when the group is created. So changing the name later won't update the attribute group code.

@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 labels Oct 26, 2017
@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team magento-engcom-team added 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 Oct 27, 2017
@RomaKis RomaKis self-assigned this Nov 2, 2017
@okorshenko
Copy link
Contributor

The issue has been fixed and delivered to the 2.2-develop branch. Will be available with upcoming patch release

@okorshenko okorshenko added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Nov 22, 2017
@magento-engcom-team
Copy link
Contributor

Hi @mikelevy300. Thank you for your report.
The issue has been fixed in magento-engcom/magento2ce#1359 by @magento-engcom-team in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Feb 8, 2018
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

4 participants