-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Category Url Rewrite not correctly generated when updating url_key through API #39632
Comments
Hi @SteffenCH. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hi @SteffenCH, Thanks for your reporting and collaboration. We have tried to reproduce the issue in Latest 2.4-develop instance and we are not able to reproduce the issue.Kindly refer the screenshots. ![]() Could you please provide us payload for the APi and also provide screenshots or screencast if possible to proceed further. Thanks. |
@engcom-Bravo You've actually managed to reproduce the issue it seems. When UPDATING a category URL through API, we expect oldUrl -> newUrl, and newUrl -> catalog/category/view/id{id} - This happens when done through backend, not when done through API however. If your screenshot is from updating using API, you have successfully reproduced the error |
Hi @SteffenCH, Thanks for your update. We have tried to reproduce the issue in Latest 2.4-develop instance and we are not able to reproduce the issue.Kindly refer the screenshots. ![]() ![]() This one when we are updating from Backend. ![]() Could you please let us know if we are missing anything and elaborate the steps to reproduce. Thanks. |
@SteffenCH: can you try with providing the flag Update: here you can find some more info about it: #29205 |
@hostep Thanks for your Contribution!!. Hi @SteffenCH, Could you please refer this comment #39632 (comment) and please let us know if you are still facing any issue. Thanks. |
Much appreciated. Will report back if it works or not - Will not be able to test it today sadly. |
Preconditions and environment
When updating an url_key in backend/admin, url rewrites are created from old-url to new-url, and new-url to category/view/id/{id} as expected.
Updating through REST API "V1/categories" (POST) results in only new-url to category/view/id/{id} being generated, essentially losing the connection between old-url to new-url and thus losing valuable SEO potential.
Steps to reproduce
Ensure "Create Permanent Redirect for URLs if URL Key Changed" is enabled in:
Stores > Configuration > Catalog > Catalog > Search Engine Optimization
Update url_key through REST API "V1/categories" (POST)
Observe
Expected result
Url rewrites should be created from old-url to new-url, and new-url to category/view/id/{id} when updating url_key through API
Actual result
Only new-url to category/view/id/{id} urls is genereated when updating url_key through API, thus losing connection between old url and new url.
Additional information
This is quite critical as it basically means that any shop managing its categories through the api with an external system can't reliably generate category urls without losing valuable SEO.
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: