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

[Issue] Take required product attributes into account when caching used products #32765

Closed
4 tasks
m2-assistant bot opened this issue Apr 15, 2021 · 2 comments
Closed
4 tasks
Assignees
Labels
Component: ConfigurableProduct Priority: P3 May be fixed according to the position in the backlog. Progress: done Reported on 2.4.x Indicates original Magento version for the Issue report. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.

Comments

@m2-assistant
Copy link

m2-assistant bot commented Apr 15, 2021

This issue is automatically created based on existing pull request: #32698: Take required product attributes into account when caching used products


Description (*)

When calling Magento\ConfigurableProduct\Model\Product\Type\Configurable::getUsedProducts() with custom required attributes after that method has already been called before, the collection doesn't load your custom defined attributes.

The caching plugin around this method, Magento\ConfigurableProduct\Model\Plugin\Frontend\UsedProductsCache::aroundGetUsedProducts() actually does take the passed required attributes into account, by generating a cache key, but once proceeded to the original method, this is lost again, when $product->getData($this->_usedProducts) already contains a product collection.

Manual testing scenarios (*)

This can be confirmed by running the added integration test without the changes I proposed, you'll see it will fail, because the meta_description attribute of the product will be null at all times.

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)
  • All automated tests passed successfully (all builds are green)
@m2-assistant m2-assistant bot added Component: ConfigurableProduct Priority: P3 May be fixed according to the position in the backlog. labels Apr 15, 2021
@m2-community-project m2-community-project bot added Progress: PR in progress Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Apr 15, 2021
@Maikel-Koek Maikel-Koek removed their assignment Jun 23, 2021
@engcom-Bravo engcom-Bravo self-assigned this Mar 7, 2024
Copy link
Author

m2-assistant bot commented Mar 7, 2024

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
Copy link
Contributor

Hi @Maikel-Koek,

The Related PR has been closed.Hence We are Closing this issue.

Please feel free to open the issue.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: ConfigurableProduct Priority: P3 May be fixed according to the position in the backlog. Progress: done Reported on 2.4.x Indicates original Magento version for the Issue report. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants