Skip to content

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

@apedicdev

Description

@apedicdev

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.

Metadata

Metadata

Assignees

Labels

Fixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions