-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Category API should support save_rewrites_history for consistency reasons #29174
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
Comments
Hi @amenk. Thank you for your report.
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:
For more details, please, review the Magento Contributor Assistant documentation. Please, add a comment to assign the issue:
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
This is WIP. \Magento\Catalog\Model\CategoryRepository::save |
* Support save_rewrites_history in save
I found a workaround but I am not happy about it iMi-digital@00176f5 Does anybody have a better idea? |
Hi @amenk. Thank you for your report.
The fix will be available with the upcoming 2.4.2 release. |
…29205 - Merge Pull Request #29205 from iMi-digital/magento2:feature/29174-save-rewrites-for-categories - Merged commits: 1. 5307bad 2. 00176f5 3. 4c99f0d 4. f0ba72a 5. 0f983b2 6. 7f380b6 7. 3361e72 8. 79c54ae 9. 99da072 10. f61a27a 11. 25111f0 12. c7822ff 13. df69e82 14. 6fde4ba 15. 9f81b49 16. 9583212 17. 1ad4482
Uh oh!
There was an error while loading. Please reload this page.
Description
When updating category URL keys via REST API there is no possibility to automatically create 301 redirects for the old URL key to the new one.
For products this is possible
Expected behavior (*)
contents of category-rename.json
When making a API call like
I expect that a new entry is created a the end of
url_rewrite
database table with the old url_key redirecting to the new category.Instead, after the API call, I cannot find the URL key anywhere in the
url_rewrite
table.Benefits
There are shops which are managed by PIM systems via API. Here it is important for SEO reasons, to allow renaming the URL key without loosing old links.
Additional information
There was already a pull request implementing something similar, but without the option to not create rewrites.
#18408
The
save_rewrites_history
is supported for products. So for consistency this should also be possible for categories.Maybe I can be implemented similarly to
\Magento\CatalogUrlRewrite\Plugin\Webapi\Controller\Rest\InputParamsResolver::afterResolve
The text was updated successfully, but these errors were encountered: