-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
When a new website/store is created URL rewrites are only generated for the new store if a category's url_key is updated.
There doesn't appear to be any mechanism to re-generate these URL rewrites for a store, and they also don't take into account any changes to the "catalog/seo/category_url_suffix" configuration value.
Preconditions
- Magento 2.2.5
- PHP 7.1.20
- MySQL 5.7.23
Steps to reproduce
- composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition {install dir}
- cd {install dir}
- ./bin/magento setup:install --backend-frontname=? --db-host=? --db-name=? --db-user=? --db-password=? --base-url=? --admin-user=? --admin-password=? --admin-email=? --admin-firstname=? --admin-lastname=?
- ./bin/magento sampledata:deploy
- ./bin/magento setup:upgrade
- Visit the admin panel and create a new website, store and store view using the same root category as the default store.
Expected result
Visiting category URLs on the frontend of the new store should match the URLs on the frontend of the default store.
Also, entries for the now store should exist in the url_rewrite table.
Actual result
URLs for the new store are in the format "/catalog/category/view/s/{url_key}/id/{category_id}/" while the default store has the expected URL format.
Also, no entries for the new store exist in the url_rewrite table and there doesn't appear to be any way to generate these short of updating the URL key for each category.