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

Magento 2.1.9 Configurable::getUsedProducts returns a different array after product collections is cached #11880

Closed
apedicdev opened this issue Oct 30, 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: 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

@apedicdev
Copy link
Contributor

apedicdev commented Oct 30, 2017

Preconditions

Magento 2.1.9

\Magento\ConfigurableProduct\Model\Product\Type\Configurable::getUsedProducts returns a different array after product collection is cached.

Steps to reproduce

  1. Load a configurable product
  2. Observe the returned array $usedProducts
  3. clean the collections cache (bin/magento cache:clean collections)
  4. Reload the same configurable product
  5. Observer again the returned array $usedProducts

Expected result

  1. The array $usedProducts should contain the same indexes->values where indexes are the product children ids.

Actual result

Before cleaning the collections cache, the returned array is a simple array indexes->values where indexes are incremental.
After cleaning the collections cache, the returned array is an associative array where the indexes are the product children ids.

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Oct 30, 2017
@apedicdev apedicdev changed the title Configurable::getUsedProducts returns a different array after product collections is cached Magento 2.1.9 Configurable::getUsedProducts returns a different array after product collections is cached Oct 30, 2017
@p-bystritsky p-bystritsky self-assigned this Nov 6, 2017
@magento-engcom-team
Copy link
Contributor

@apedicdev, thank you for your report.
We've created internal ticket(s) MAGETWO-83395 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 Nov 7, 2017
p-bystritsky added a commit to p-bystritsky/magento2 that referenced this issue Nov 8, 2017
@okorshenko
Copy link
Contributor

The issue has been fixed in 2.2-develop branch. Will be available with 2.2.2 release

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

Hi @apedicdev. Thank you for your report.
The issue has been fixed in magento-engcom/magento2ce#1287 by @magento-engcom-team 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 25, 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: 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

5 participants