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

Duplicating product with translated url keys over multiple storeviews causes non-unique url keys to be generated #21737

Closed
hostep opened this issue Mar 13, 2019 · 4 comments
Assignees
Labels
Component: Catalog Fixed in 2.3.x The issue has been fixed in 2.3 release line 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.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

Comments

@hostep
Copy link
Contributor

hostep commented Mar 13, 2019

Hi there

I'm back with yet another problem in Magento with url keys on multiple storeviews which are incorrectly generated.
This might already have been reported before, but I'm trying to create an issue with very clear steps of how to reproduce. So hopefully it can get some well needed attention.

Preconditions (*)

  1. PHP 7.2.15
  2. Magento 2.3.0, 2.2.x, 2.1.x, 2.0.x

Steps to reproduce (*)

  1. Setup a vanilla Magento 2.3.0 installation using composer
  2. Make sure you have 2 storeviews, I've opted for the names 'English' and 'French'
  3. Create a category, I just named it 'Test', nothing translated here
  4. Create a product:
    • Name: Default
    • Sku: Default
    • Price: 123
    • Qty: 9999
    • Category: Test
    • Url key: default
  5. Switch to the English storeview, and change the url key of the product to 'english', uncheck 'Create Permanent Redirect for old URL'
  6. Switch to the French storeview, and change the url key of the product to 'french', uncheck 'Create Permanent Redirect for old URL'
  7. Up until now, everything is perfectly fine.
  8. Back on the 'All Store Views' scope, open the product and click the dropdown next to the Save button and choose 'Save & Duplicate'
  9. Now take a look in the database at the various url keys and url rewrites which got generated, because they are very wrong and contain duplicates which Magento shouldn't allow.

Expected result (*)

  1. Url key for the second product on the admin store is different then the first product
  2. Url key for the second product on the english store is different then the first product
  3. Url key for the second product on the french store is different then the first product
  4. Url rewrites are generated with the url keys from each individual storeview

Actual result (*)

  1. Url key for the second product on the admin store is 'default-1' => good
  2. Url key for the second product on the english store is 'english' => not good, is not unique
  3. Url key for the second product on the french store is 'french' => not good, is not unique
  4. Url rewrites for the second product are like this:
entity_type entity_id request_path target_path store_id
product 2 default-1.html catalog/product/view/id/2 1
product 2 test/default-1.html catalog/product/view/id/2/category/3 1
product 2 default-1.html catalog/product/view/id/2 2
product 2 test/default-1.html catalog/product/view/id/2/category/3 2

=> not good, all of these are incorrect in that they use the url key of the 'all store views' scope, and not from the storeview scope itself.

@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Mar 13, 2019

Hi @hostep. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@hostep do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Mar 19, 2019

Hi @engcom-backlog-nazar. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

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

  • 4. Verify that the issue is reproducible on 2.3-develop branch

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

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • Next steps are available in case you are a member of Community Maintainers.

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@ghost ghost added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Component: Catalog Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Mar 19, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-backlog-nazar
Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-98826, MAGETWO-98827 were created

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

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Mar 21, 2019
yvechirko added a commit to yvechirko/magento2 that referenced this issue Apr 5, 2019
…ple storeviews causes non-unique url keys to be generated
@ghost ghost assigned yvechirko Apr 15, 2019
@magento-engcom-team
Copy link
Contributor

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Apr 26, 2019
magento-engcom-team added a commit that referenced this issue Apr 26, 2019
… multiple sto… #22178

 - Merge Pull Request #22178 from yvechirko/magento2:#21737_Duplicating_product_url_keys
 - Merged commits:
   1. 48b0ab8
   2. 30b0f91
   3. 4e15099
magento-engcom-team added a commit that referenced this issue Apr 26, 2019
… multiple sto… #22178

 - Merge Pull Request #22178 from yvechirko/magento2:#21737_Duplicating_product_url_keys
 - Merged commits:
   1. 48b0ab8
   2. 30b0f91
   3. 4e15099
   4. 0c88939
   5. a45d519
magento-engcom-team added a commit that referenced this issue Apr 26, 2019
… multiple sto… #22178

 - Merge Pull Request #22178 from yvechirko/magento2:#21737_Duplicating_product_url_keys
 - Merged commits:
   1. 48b0ab8
   2. 30b0f91
   3. 4e15099
   4. 0c88939
   5. a45d519
   6. 5c384be
   7. 9721c67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Catalog Fixed in 2.3.x The issue has been fixed in 2.3 release line 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.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
Projects
None yet
Development

No branches or pull requests

3 participants