-
Notifications
You must be signed in to change notification settings - Fork 9.4k
"Use Categories Path for Product URLs" not working for intermediate categories #12662
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
Is this issue relevant for 2.2.x by the way? |
Same issue on magento 2.2.2-dev fresh install. |
@AymericJoubert, thank you for your report. |
#mageconf |
Hey guys any update on this issue? or some way to get around? |
Up :) |
Best, is there a solution we have the same issue in prod our prod environment.... |
Why anyone need to switch "Use Categories Path for Product URLs" on prod?
@lasg125 the problem here is that URL rewrites cannot be recreated from nowhere. Unlike the switch of suffix (like As a workaround you can re-save all products programmatically. As a permanent solution most likely some kind of similar asynchronous operation is needed, it is not possible immediately after you change setting via Admin UI in case of a big catalog. |
@lasg125 We tried a lot of solutions (after a back-up of the database) but nothing seems to work on magento 2.2.2 Our last solution was this one : https://github.com/olegkoval/magento2-regenerate_url_rewrites For now it seems to work and we hope it will stay like this. Hope it helps, many thanks to Oleg Koval (which provides this for free.) |
For me I couldn't replicate the issue above on 2.2.6, but I landed here by replicating (and then treating) the symptoms described. The setting "Stores > Configuration > Catalog > Catalog > Search Engine Optimization > Use Categories Path for Product URLs" only generates aliases for Categories of which the product is directly assigned to, and will not generate aliases for products that are only members of categories via the Category setting "Is Anchor". For example, the category tree below: -> Appliances You might set "Appliances" and "Kitchen" to both be Anchor Categories, and only assign the product to the Toasters category, and let "Is Anchor" automatically define your Toasters are also within both "Kitchen" and "Appliances". For me this resulted in my Product URLs not getting Category Paths for the categories "Appliances" and "Kitchen", but getting Category Paths for the Product URLs auto-aliased for the "Toasters" path. Hope someone finds this useful. |
Hi @engcom-Echo. Thank you for working on this issue.
|
Hello All I am not able to reproduce this issue on the 2.4-develop branch by provided steps. Testing scenario: Preconditions Steps to reproduce:
Result |
Uh oh!
There was an error while loading. Please reload this page.
When using category path for product url, there is no generated url key for intermediate categories. In the url key table you can find one url rewrite for 1st level category and one for last level category.
This seems to work only on the last level category.
Preconditions
Steps to reproduce
Expected result
Actual result
The text was updated successfully, but these errors were encountered: