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)

Activity

self-assigned this
on May 23, 2023
m2-assistant

m2-assistant commented on May 23, 2023

@m2-assistant
Author

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
    3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
    5. Add label Issue: Confirmed once verification is complete.
    6. Make sure that automatic system confirms that report has been added to the backlog.
engcom-Bravo

engcom-Bravo commented on May 24, 2023

@engcom-Bravo
Contributor

Hi @adamzero1,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Manual testing scenarios (*)

  • Ensure MSI is disabled
  • Ensure indexers are on "Update on schedule"
  • Configure 2 simple products A & B, set them to both be in stock
  • Configure 2 configurable products C & D, assign products A & B to both. (so you have 2 configurables, with 2 options)
  • Visit the frontend for both the configurables. Both should have both options.
  • Set product A to out of stock and save
  • allow the indexer to run.
  • Re-vist the frontend for both configurables.
Screenshot 2023-05-24 at 3 41 23 PM Screenshot 2023-05-24 at 3 42 12 PM Screenshot 2023-05-24 at 3 40 27 PM Screenshot 2023-05-24 at 3 41 08 PM

Both Configurable Products displaying only B product.

Kindly recheck the behaviour on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.

Thanks.

engcom-Bravo

engcom-Bravo commented on Jun 5, 2023

@engcom-Bravo
Contributor

Hi @adamzero1,

We have noticed that this issue has not been updated for a period of 14 Days.
Hence we assume that this issue is fixed now, so we are closing it. Please raise a fresh ticket or reopen this ticket if you need more assistance on this.

Thanks.

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

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

    Participants

    @adamzero1@engcom-Bravo@engcom-Hotel

    Issue actions

      [Issue] fix: parent product cache not clearing · Issue #37530 · magento/magento2