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

BUG: Category Repository get()'s argument store_id does not work #27044

Closed
lbajsarowicz opened this issue Feb 27, 2020 · 5 comments
Closed

BUG: Category Repository get()'s argument store_id does not work #27044

lbajsarowicz opened this issue Feb 27, 2020 · 5 comments
Assignees
Labels
Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Reported on 2.4.0 Indicates original Magento version for the Issue report.

Comments

@lbajsarowicz
Copy link
Contributor

Description

The implementation of $storeId support was never finished.

Preconditions (*)

  1. Magento 2.4-develop

Steps to reproduce (*)

  1. Create 2 stores
  2. default with ID 1
  3. extra with ID 2
  4. Create Category with url_key value: category-1 (let's assume it's ID is 333)
  5. Open Category edit and change scope to extra store
  6. Change url_key to value some-magic-key
  7. Create class that use CategoryRepositoryInterface
  8. Execute $categoryRepository->get(333, 2)

Data is properly saved in the MySQL table:
image

Expected result (*)

  1. Category data with url_key = some-magic-key is returned

Actual result (*)

  1. Category data with url_key = category-1 is returned

Related issues

  1. https://github.com/magento/magento2#12881

Not related issues

  1. Please not treat it as related to Saving product with non-default store scope causes untouched attributes to become store scoped if loaded using ProductRepository #8897: That one is related with EAV error on saving attributes when saved with API.
@m2-assistant
Copy link

m2-assistant bot commented Feb 27, 2020

Hi @lbajsarowicz. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@lbajsarowicz do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Feb 27, 2020
@lbajsarowicz lbajsarowicz changed the title BUG: Category Repository get()'s method store_id does not work BUG: Category Repository get()'s argument store_id does not work Feb 27, 2020
@vincentle89
Copy link
Contributor

vincentle89 commented Feb 27, 2020

Hi @lbajsarowicz

I can't reproduce this issue on version 2.4-develop. Please take a look at my record: https://youtu.be/oVCcF9Av06E

@vincentle89 vincentle89 added the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Feb 27, 2020
@lbajsarowicz
Copy link
Contributor Author

Let me verify that, as I also covered that with integration test and... Isolated, that problem does not occur.

lbajsarowicz added a commit to lbajsarowicz/magento2 that referenced this issue Feb 27, 2020
@ghost ghost assigned lbajsarowicz Feb 27, 2020
lbajsarowicz added a commit to lbajsarowicz/magento2 that referenced this issue Feb 27, 2020
@lbajsarowicz
Copy link
Contributor Author

Problem is actually related to internal cache storage.
It's not related to Repository but to the fact, that it does not update cache after save.

@magento-engcom-team
Copy link
Contributor

Hi @lbajsarowicz. Thank you for your report.
The issue has been fixed in #27048 by @lbajsarowicz in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.0 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Feb 28, 2020
magento-engcom-team added a commit that referenced this issue Feb 28, 2020
…y Repository \`get()\` #27048

 - Merge Pull Request #27048 from lbajsarowicz/magento2:bugfix/27044-category-repository-storeid
 - Merged commits:
   1. 2d15e91
   2. 8ad33f5
magento-engcom-team pushed a commit that referenced this issue Feb 28, 2020
@magento-engcom-team magento-engcom-team added this to Done (last 30 days) in Community Backlog Mar 24, 2020
@magento-engcom-team magento-engcom-team added the Reported on 2.4.0 Indicates original Magento version for the Issue report. label Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Reported on 2.4.0 Indicates original Magento version for the Issue report.
Projects
No open projects
Community Backlog
  
Done (last 30 days)
Development

No branches or pull requests

4 participants