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

Fix error in configurables #24659

Merged
merged 3 commits into from Oct 8, 2019
Merged

Conversation

elfeffe
Copy link
Contributor

@elfeffe elfeffe commented Sep 19, 2019

Problem with configurables when the simple products that were associated did not have a value for the configurable attribute.
Fix this issue #14240

Description (*)

Fixed Issues (if relevant)

  1. /vendor/magento/module-configurable-product/Model/Product/Type/VariationMatrix.php on line 43 #14240: /vendor/magento/module-configurable-product/Model/Product/Type/VariationMatrix.php on line 43 /vendor/magento/module-configurable-product/Model/Product/Type/VariationMatrix.php on line 43 #14240

Questions or comments

Contribution checklist (*)

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

Problem with configurables when the simple products that were associated did not have a value for the configurable attribute.
Fix this issue magento#14240
@m2-assistant
Copy link

m2-assistant bot commented Sep 19, 2019

Hi @elfeffe. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Sep 19, 2019

CLA assistant check
All committers have signed the CLA.

@ghost ghost assigned sidolov Sep 20, 2019
@sidolov sidolov added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Sep 23, 2019
@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-5937 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

@elfeffe thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@engcom-Delta
Copy link
Contributor

Hi @elfeffe Could you provide more information how to reproduce issue #14240 ?

@elfeffe
Copy link
Contributor Author

elfeffe commented Sep 26, 2019

@engcom-Delta

The problem was that we had a configurable product set to use two configurable attributes.
One or more of the simple products that were associated did not have a value for the configurable attribute.
For some reason we had the values when we linked the products, but we don't know why we lost the values, and when we try to edit the configurable product, we get an error because there is no value.

I'm not the only one, this question in StackeExchange is related to the same:
https://magento.stackexchange.com/questions/144954/variationmatrix-error-with-configurable-product-in-admin

@engcom-Delta
Copy link
Contributor

@elfeffe I tried again and still cannot reproduce issue.
Manual testing scenario:

  • Create configurable product with two dropdown attributes:
    • Color with values: red, blue
    • Test with values: 1, 2, 3
  • Delete value of Color attribute for simple product that is associated with configurable product(e.g., conf1-red-2)
  • Go to Edit page for configurable product in admin
  • Refresh page.
  • ✔️ Simple product(e.g., conf1-red-2) is not present in Configurations tab
  • Click Save button
  • ✔️ Configurable product is successfully saved with existing configurations

#24659

@elfeffe
Copy link
Contributor Author

elfeffe commented Oct 2, 2019

@engcom-Delta Well, I'm not sure about how to reproduce it.
But I had the offset error when I tried to edit, and as you see there is at least 2 different persons with the same problem in StackOverflow.
In any case, it seems to ve better to check if the array is empty in case this is not, and this is an extra control that will not bother anyone.

@engcom-Golf
Copy link
Contributor

HI @elfeffe could you please sign in new CLA ?

@elfeffe
Copy link
Contributor Author

elfeffe commented Oct 7, 2019 via email

@engcom-Golf engcom-Golf closed this Oct 7, 2019
@m2-assistant
Copy link

m2-assistant bot commented Oct 7, 2019

Hi @elfeffe, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@engcom-Golf engcom-Golf reopened this Oct 7, 2019
@sidolov sidolov added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests and removed Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests labels Oct 7, 2019
@magento-engcom-team magento-engcom-team merged commit 4437767 into magento:2.3-develop Oct 8, 2019
@m2-assistant
Copy link

m2-assistant bot commented Oct 8, 2019

Hi @elfeffe, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@elfeffe elfeffe deleted the patch-1 branch November 2, 2019 14:22
@magento-seis10
Copy link

This is still an issue for 2.3.5-p2

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

Successfully merging this pull request may close these issues.

None yet

8 participants