Closed
Description
I'm pretty sure this has been reported before, but please excuse me if I didn't find the correct duplicate, since there are so many issues being reported around this. If there is an exact duplicate, please mark this issue as a duplicate and close it.
My hope is to provide a easy reproducible case which can easily be tested and maybe finally put this big issue a bit more in the spotlight.
Preconditions
- PHP 7.0.24
- Both Magento 2.1.9 and 2.2.0 (the situation in 2.2.0 is slightly better then 2.1.9, but there are still problems)
Steps to reproduce
- Setup a Magento 2.1.9 and 2.2.0 installation separately and execute all the steps mentioned below on both of them
- In the backend, go to Stores > Configuration > Catalog > Catalog > Search Engine Optimization and change the configuration 'Use Categories Path for Product URLs' to 'Yes'
- In the backend, go to Stores > All Stores and make sure you have 2 storeviews, I'm using 'Dutch' and 'French' as examples here
- In the backend, go to Catalog > Categories and create 2 subcategories with the following url keys in the default values and 2 storeview specific (don't check the 'Create Permanent Redirect for old URL' checkbox while doing so):
Tree | Name | Default | Dutch | French |
---|---|---|---|---|
Default Category/Level 1 | Level 1 | level-1 | level-1-nl | level-1-fr |
Default Category/Level 1/Level 2 | Level 2 | level-2 | level-2-nl | level-2-fr |
- At this point, the url rewrites in the database table are correct, so no issues here
- In the backend, go to Catalog > Products and create a new simple product. I named it 'Product 1'. Assign it to the category 'Level 2', not on any category above it.
- Check the
url_rewrite
table in the database, it is different in Magento 2.1.9 and 2.2.0, in 2.2.0 it is slightly better then in 2.1.9, but still not bug free
Expected result
request_path | target_path | store_id |
---|---|---|
level-1-nl.html | catalog/category/view/id/3 | 1 |
level-1-nl/level-2-nl.html | catalog/category/view/id/4 | 1 |
level-1-fr.html | catalog/category/view/id/3 | 2 |
level-1-fr/level-2-fr.html | catalog/category/view/id/4 | 2 |
product-1.html | catalog/product/view/id/1 | 1 |
level-1-nl/level-2-nl/product-1.html | catalog/product/view/id/1/category/4 | 1 |
level-1-nl/product-1.html | catalog/product/view/id/1/category/3 | 1 |
product-1.html | catalog/product/view/id/1 | 2 |
level-1-fr/level-2-fr/product-1.html | catalog/product/view/id/1/category/4 | 2 |
level-1-fr/product-1.html | catalog/product/view/id/1/category/3 | 2 |
Actual result
Magento 2.1.9
request_path | target_path | store_id |
---|---|---|
level-1-nl.html | catalog/category/view/id/3 | 1 |
level-1-nl/level-2-nl.html | catalog/category/view/id/4 | 1 |
level-1-fr.html | catalog/category/view/id/3 | 2 |
level-1-fr/level-2-fr.html | catalog/category/view/id/4 | 2 |
product-1.html | catalog/product/view/id/1 | 1 |
level-1/level-2/product-1.html | catalog/product/view/id/1/category/4 | 1 |
level-1/product-1.html | catalog/product/view/id/1/category/3 | 1 |
product-1.html | catalog/product/view/id/1 | 2 |
level-1/level-2/product-1.html | catalog/product/view/id/1/category/4 | 2 |
level-1/product-1.html | catalog/product/view/id/1/category/3 | 2 |
Magento 2.2.0
request_path | target_path | store_id |
---|---|---|
level-1-nl.html | catalog/category/view/id/3 | 1 |
level-1-nl/level-2-nl.html | catalog/category/view/id/4 | 1 |
level-1-fr.html | catalog/category/view/id/3 | 2 |
level-1-fr/level-2-fr.html | catalog/category/view/id/4 | 2 |
product-1.html | catalog/product/view/id/1 | 1 |
level-1-nl/level-2-nl/product-1.html | catalog/product/view/id/1/category/4 | 1 |
level-1/product-1.html | catalog/product/view/id/1/category/3 | 1 |
product-1.html | catalog/product/view/id/1 | 2 |
level-1-fr/level-2-fr/product-1.html | catalog/product/view/id/1/category/4 | 2 |
level-1/product-1.html | catalog/product/view/id/1/category/3 | 2 |
Metadata
Metadata
Assignees
Labels
Distributed Contribution DayThe issue has been fixed in 2.4-develop branchGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release