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

[Forwardport] Category\Collection::joinUrlRewrite should use the store set on the collection #13

Open
wants to merge 7 commits into
base: 2.3-develop
Choose a base branch
from

Conversation

rostyslav-hymon
Copy link
Owner

Original Pull Request

magento#13716
The problem is that Magento\Catalog\Model\ResourceModel\Category\Collection::joinUrlRewrite always use the store id from the store manager. I think that it should instead use the storeId set on the actual collection.

Description

Now joinUrlRewrite uses directly the storeManager, but if a store is set directly on the collection, it should use the store set, and not the default passed by the store manager.
The method getStoreId(), if not set, already goes on fallback to the store manager and get the default, so it should be safe to directly use getStoreId().

Fixed Issues (if relevant)

  1. Category\Collection::joinUrlRewrite should use the store set on the collection magento/magento2#13704: Category\Collection::joinUrlRewrite should use the store set on the collection

Manual testing scenarios

I already provided an automated unit test. There is an code example in the related issue magento#13704.
It's my first automated test here, so I hope it's ok :)

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 on Travis CI are green)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants