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

Magetwo 70954: Remove the component.clear from the custom options type. This causes the 'elem' array to become out of sync with the recordData #11824

Merged
merged 2 commits into from
Oct 31, 2017

Conversation

briscoda
Copy link

@briscoda briscoda commented Oct 27, 2017

Description

The issue here is that when switching custom options types in the product edit screen, there can be instances where there is a perpetual spinner that is shown. In my findings, this was because there were 2 variables and 1 function that were checked to be 'in-sync' with each other as far as the length of items in each javascript array.

"recordData", "elems", and function "getChildItems". These three pieces were in the "dynamic-rows.js" file. As far as I could tell, the spinner in is not something that would ever make sense to be used in this case. However, because it was listed as an observable of elems, and elems was used for other things, it seemed to make more sense to find the cause of why elems would be 0 when it needed to match the getChildItems function.

Tracing this back, "elems" was part of the UiSelect object, and it was doing a component.clear() whenever the value of the option type selector changed. There is also no history from this file before: 566be67#diff-2c1b11e20e699888b25df7c484e62d20

So it was difficult to say if this was added in or generated. I search the code base for instances of uses of the UiSelect as a component to clear values, and didn't find anything that seemed exceptional, so I think this removal would be localized to only thes adminhtml custom options.

Fixed Issues (if relevant)

  1. Magento 2 Loading custom option dropdown issue #10291: Magento 2 Loading custom option dropdown issue

Manual testing scenarios

  1. Login to the admin
  2. Go to catalog / product
  3. Add new or editExisting product
  4. Add custom option
  5. Use dropdown select and add a value
  6. Change to file or other type of option that is not select.
  7. Change back to select type.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

…e. This causes the 'elem' array to become out of sync with the recordData in the function mentioned in the comment above. Issue: 10291
@okorshenko okorshenko self-assigned this Oct 27, 2017
@okorshenko okorshenko added this to the October 2017 milestone Oct 27, 2017
@okorshenko okorshenko added Release Line: 2.2 2.2.x bug report Component: Catalog 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
@magento-team magento-team merged commit fe44f8f into magento:2.2-develop Oct 31, 2017
magento-team pushed a commit that referenced this pull request Oct 31, 2017
…tom options type. This causes the 'elem' array to become out of sync with the recordData #11824
magento-team pushed a commit that referenced this pull request Oct 31, 2017
[EngCom] Public Pull Requests - 2.2-develop
 - MAGETWO-82955: [Backport 2.2-develop] FIX show visual swatches in admin - product attribute #11747
 - MAGETWO-82943: Magetwo 70954: Remove the component.clear from the custom options type. This causes the 'elem' array to become out of sync with the recordData #11824
 - MAGETWO-82710: Fix issue #10032 - Download back-up .tgz always takes the latest that's created (2.2-develop) #11595
 - MAGETWO-81994: Products added to cart with REST API give total prices equal to zero #11458
 - MAGETWO-81422: #11211 Fix Store View switcher #11337
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Catalog Progress: accept Release Line: 2.2 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

Successfully merging this pull request may close these issues.

3 participants