Skip to content

[Issue] fix: parent product cache not clearing #37530

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #37528: fix: parent product cache not clearing


Description (*)

When a simple product has more then one parent, only one of the parents will have their cache cleared.

Related Pull Requests

Fixed Issues (if relevant)

N/A was unable to find an existing issue relating to this

Manual testing scenarios (*)

  1. Ensure MSI is disabled
  2. Ensure indexers are on "Update on schedule"
  3. Configure 2 simple products A & B, set them to both be in stock
  4. Configure 2 configurable products C & D, assign products A & B to both. (so you have 2 configurables, with 2 options)
  5. Visit the frontend for both the configurables. Both should have both options.
  6. Set product A to out of stock and save
  7. allow the indexer to run.
  8. Re-vist the frontend for both configurables.
    Expected: Both configurables should only have option B present
    Actual: One of the configurables will still have both A and B options available.

Additional Notes
Saving the broken configurable will clear cache so the issue is "fixed".

Questions or comments

I was hoping to write a unit test for this, but given how much of the class is private methods and also direct SQL queries (with no middle class) it would make it very difficult.

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)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Labels

Issue: needs updateAdditional information is require, waiting for responsePriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.xIndicates original Magento version for the Issue report.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions