Skip to content
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

URL Rewrites vs multiple storeviews - too many rewrites are being generated #11616

Closed
hostep opened this issue Oct 21, 2017 · 7 comments
Closed
Assignees
Labels
Component: CatalogUrlRewrite Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@hostep
Copy link
Contributor

hostep commented Oct 21, 2017

This case demonstrates that too many url rewrites are being generated
It happens in Magento 2.4-develop, I tested it in 2.2 and over there it works as expected

Preconditions

  1. PHP 7.2
  2. Magento 2.4-develop

Steps to reproduce

  1. Setup a Magento 2.4-develop installation
  2. In the backend, go to Stores > Configuration > Catalog > Catalog > Search Engine Optimization and change the configuration 'Use Categories Path for Product URLs' to 'Yes'
  3. In the backend, go to Stores > All Stores and make sure you have 2 storeviews, I'm using 'Dutch' and 'French' as examples here
  4. 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
  1. In the backend, go to Catalog > Products and create a new simple product. I named it 'Product 2'. Assign it to both categories 'Level 1' and 'Level 2'
  2. Check the url_rewrite table in the database

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-2.html catalog/product/view/id/2 1
level-1-nl/product-2.html catalog/product/view/id/2/category/3 1
level-1-nl/level-2-nl/product-2.html catalog/product/view/id/2/category/4 1
product-2.html catalog/product/view/id/2 2
level-1-fr/product-2.html catalog/product/view/id/2/category/3 2
level-1-fr/level-2-fr/product-2.html catalog/product/view/id/2/category/4 2

Actual result

Magento 2.4-develop

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-2.html catalog/product/view/id/2 1
level-1-nl/product-2.html catalog/product/view/id/2/category/3 1
level-1-nl/level-2-nl/product-2.html catalog/product/view/id/2/category/4 1
level-1/product-2.html catalog/product/view/id/2/category/3 1
product-2.html catalog/product/view/id/2 2
level-1-fr/product-2.html catalog/product/view/id/2/category/3 2
level-1-fr/level-2-fr/product-2.html catalog/product/view/id/2/category/4 2
level-1/product-2.html catalog/product/view/id/2/category/3 2

The two rows in bold shouldn't be generated.

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Oct 21, 2017
@orlangur
Copy link
Contributor

Are level-1/product-2.html request paths working for those stores?

@hostep
Copy link
Contributor Author

hostep commented Oct 21, 2017

Correct, so all these url's work:

Dutch storeview:

  • level-1-nl/product-2.html
  • level-1/product-2.html

French storeview:

  • level-1-fr/product-2.html
  • level-1/product-2.html

@orlangur orlangur added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Oct 21, 2017
@magento-engcom-team
Copy link
Contributor

@hostep, thank you for your report.
We've created internal ticket(s) MAGETWO-82512 to track progress on the issue.

@magento-engcom-team magento-engcom-team added 2.2.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Oct 23, 2017
@engcom-Alfa engcom-Alfa self-assigned this Jan 10, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jan 10, 2020

Hi @engcom-Alfa. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


@engcom-Alfa engcom-Alfa removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Jan 10, 2020
@engcom-Alfa
Copy link
Contributor

engcom-Alfa commented Jan 10, 2020

The issue is still reproducible on the fresh 2.4-develop instance

Actual Result:
screen

@engcom-Alfa engcom-Alfa added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release labels Jan 10, 2020
@ghost ghost unassigned engcom-Alfa Jan 10, 2020
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Alfa
Thank you for verifying the issue. Based on the provided information internal tickets MC-30342 were created

Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@ghost ghost assigned hostep Feb 9, 2020
@slavvka slavvka added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Mar 17, 2020
@slavvka
Copy link
Member

slavvka commented Mar 17, 2020

@slavvka slavvka closed this as completed Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: CatalogUrlRewrite Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
None yet
Development

No branches or pull requests

6 participants