-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Category Rewrites are generating even if config is disabled #39070
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 @sheepfy. 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 @sheepfy, Thanks for your reporting and collaboration. We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots. ![]() ![]() Having category rewrites + product rewrite Hence Confirming the issue. Thanks. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-12801 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Bravo. Thank you for verifying the issue. |
same #38317 |
This issue can be closed. It seems fixed in Magento 2.4.8. |
I'm closing this issue as it was already fixed. |
Preconditions and environment
The old version had this if statements:
if ($this->isCategoryRewritesEnabled()) {
https://github.com/magento/magento2/blob/2.4.6-p1/app/code/Magento/CatalogUrlRewrite/Model/ProductScopeRewriteGenerator.php
Checking now the 2.4.7-p1 version, seems that the generation logic was moved into a separate method:
private function generateCategoryUrls(int $storeId, Product $product, ObjectRegistry $categories): array
But the IF statement was forgot to be added. (Also if checking the other category generation method "generateCategoryUrlsInStoreGroup", that one contains the IF statement)
https://github.com/magento/magento2/blob/2.4.7-p1/app/code/Magento/CatalogUrlRewrite/Model/ProductScopeRewriteGenerator.php
Steps to reproduce
Set the admin config: catalog/seo/generate_category_product_rewrites to 0 (it should be by default set to 0)
Save a product/create a product and then check the url rewrites
Note that in order to trigger the url generation, you need to have data changes on the product. For example, do change visibility from Catalog, Search to Catalog to trigger it
Expected result
Have only product rewrite
Actual result
Have category rewrites + product rewrite

Additional information
No response
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: