Closed kanevbg closed 1 year ago
Hi @kanevbg. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
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: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- 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.
Hi @kanevbg,
Thank you for reporting and collaboration. Verified the issue on Magento 2.4-develop instance and the issue is not reproducible. Kindly refer the screenhsots.
Steps to reproduce :
1.Navigate to admin panel 2.Open product with ID=2092 3.Add the product to the "DE" website. Check url_rewrite, with proper knowledge on place you will understand that they are correct. 4.Switch the scope to "DE View", set the URL Key "url-key-in-de-store-view", unset the "Create Permanent Redirect for old 5.URL" checkbox (in order to keep the data simpler) and save the product. Again you should understand that the data for that product in url_rewrites table is correct at this time. 6.Now switch back to Global scope for the product, remove the product's categories leaving only the "Default Category" and save the product. Now the url_rewrites table will hold the following data:
We are getting only two records in url_rewrite table.
Kindly recheck the behavior on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.
Thanks.
@magento give me 2.4-develop instance
Hi @kanevbg. Thank you for your request. I'm working on Magento instance for you.
Hi @kanevbg, here is your Magento Instance: https://0c6b862f4ff2b8d1ffcfcb95a258560e.instances.magento-community.engineering Admin access: https://0c6b862f4ff2b8d1ffcfcb95a258560e.instances.magento-community.engineering/admin_5d29 Login: e3856386 Password: 1cd9772220eb
@engcom-Bravo the Magento Instance provided by the bot is not having second website, I'd have to check that later on local instance.
Thanks for quick response @kanevbg
I compared 2.4.5-p1 sources to the 2.4-develop source and identified change in the Magento_CatalogUrlRewrite module which pointed me to that commit: https://github.com/magento/magento2/commit/e46f719559924e703ef3c7fdc728ec1b232a7509 (ACP2E-1304)
This is what resolved the issue, so yes, it is fixed in 2.4-develop already.
EDIT: There is still problematic case. When saving product from store view scope and you have added the product to more categories for that save, then if the product were added to other website where the product has url_key for the concrete store view(s) than for these store views the links will not be created! So basically the same problem, but in order to observe it you should save the product from store view scope and have the product at least to 1 other store view with custom url_key for that scope. @engcom-Bravo I guess you can reproduce it with that info, if you are unable to, please let me know.
@kanevbg: your new problematic case sounds related to what is trying to be fixed here: https://github.com/magento/magento2/pull/35053, not sure if it's exactly the same though.
@hostep By description and code change it seems to target the same problematic case. Thank you for sharing and I am adding the issue link: https://github.com/magento/magento2/issues/32910. As far as I understand the PR is logically accepted and this will likely be the code changes to be merged so I will try the changes from the PR as patch in one of my projects and provide feedback later on.
@hostep Thanks for your contribution & collaboration over here.
Hi @kanevbg,
Thanks for your update.
Kindly can you update can we close this as duplicate of https://github.com/magento/magento2/issues/32910.
Thanks.
@engcom-Bravo @hostep sadly the changes of #35053 do not resolved the case described in that issue :/ Maybe the internal person who worked out that fix https://github.com/magento/magento2/commit/e46f719559924e703ef3c7fdc728ec1b232a7509 should be notified for that issue maybe he/she is in best position to fix it for the case where the save and category changes is performed from the store view scope.
@engcom-Bravo Please re-test with the case described in the edit of that comment: https://github.com/magento/magento2/issues/36733#issuecomment-1380491110 in order to decide if the issue needs updating or is ready for work.
Hi @kanevbg,
Thanks for your update.
Kindly can you elaborate the steps for this comment https://github.com/magento/magento2/issues/36733#issuecomment-1380491110 for reproduce the issue. it will helpful for us.
Thanks.
@engcom-Bravo Sure, sorry for being late.
url_rewrite table for "entity_type = "product" and entity_id = 2024" to hold only URLs without categories.
The url_rewrite table holds obsolete URLs which were used for prouduct's URLs with categories the product was previously added in for the store views different from the saved one - "DE View" in the example above.
@magento give me 2.4-develop instance
Hi @kanevbg. Thank you for your request. I'm working on Magento instance for you.
Hi @kanevbg, here is your Magento Instance: https://0c6b862f4ff2b8d1ffcfcb95a258560e.instances.magento-community.engineering Admin access: https://0c6b862f4ff2b8d1ffcfcb95a258560e.instances.magento-community.engineering/admin_c58a Login: aa1159ca Password: 4175a1d27564
@engcom-Bravo let me know if you need anything else.
@magento give me 2.4-develop instance
Hi @kanevbg. Thank you for your request. I'm working on Magento instance for you.
Hi @kanevbg, here is your Magento Instance: https://0c6b862f4ff2b8d1ffcfcb95a258560e.instances.magento-community.engineering Admin access: https://0c6b862f4ff2b8d1ffcfcb95a258560e.instances.magento-community.engineering/admin_e435 Login: 50d093be Password: 2f74570215b3
Hi @kanevbg,
Thanks for your update.
Verified the issue on Magento 2.4-develop instance and the issue is not reproducible. Kindly refer the screenhsots.
Steps to reproduce :
1.Navigate to admin panel 2.Open product with ID=2024 3.Add the product to all of the rest websites (at least 3 in total). Check url_rewrite, with proper knowledge on place you will understand that they are correct for each store view. 4.Switch the scope to "DE View", set the URL Key "url-key-in-de-store-view", unset the "Create Permanent Redirect for old URL" checkbox (in order to keep the data simpler) and save the product. Again you should understand that the data for that product in url_rewrites table is correct at this time. 5.Repeat step 4 for the rest of store view scopes. The exact value of the URL Key is not important, it is important to have a value on store view scope and not "Use default/Use website". Again you should understand that the data for that product in url_rewrites table is correct at this time. 6.Now switch back to DE store view scope for the product, remove the product's categories leaving only the "Default Category" and save the product. Now the url_rewrites table will still hold data for the rest of the store views with the removed categories of the product even though that the categories are per global scope and they were removed from the product.
KIndly let us know if we are missing anything.
Kindly recheck the behavior on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.
Thanks.
Hi @kanevbg,
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.
Preconditions and environment
Steps to reproduce
Expected result
Only two records to exists in the url_rewrite table for "entity_type = "product" and entity_id = 2024" as the product in not in ANY categories, only the root category, so one URL without category should exists per each store view the product is added in.
Actual result
The url_rewrite table hold obsolete URLs which were used for categories the product was previously added in for the store "DE View".
Additional information
No response
Release note
Fixes issue where product save does not update URL rewrites for all store views in Magento 2.4.5 if URL Key is preset on store view scope different from the saved one from the admin panel.
Triage and priority