magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.56k stars 9.32k forks source link

URL Key already exist error coming if we give same name for two products. #21860

Closed i95devdivya closed 5 years ago

i95devdivya commented 5 years ago

Preconditions

  1. Magento EE 2.2.6

  2. PHP 7.1

Steps to reproduce

  1. Create a Product from Magento Admin and set visibility to catalog & search or catalog or search.

  2. Create another product with same name. And select visibility catalog & search or catalog or search.

Expected result

  1. If product has same name, URL key should modify like SKU

Actual result

  1. Same URL key is taking for both products and throwing error.

Screen-cast

https://www.screencast.com/t/2Ih5PeNHcum

magento-engcom-team commented 5 years ago

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

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.

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

magento-engcom-team commented 5 years ago

Hi @shikhamis11. 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: :point_down:

shikhamis11 commented 5 years ago

@magento-engcom-team give me 2.3-develop instance

magento-engcom-team commented 5 years ago

Hi @shikhamis11. Thank you for your request. I'm working on Magento 2.3-develop instance for you

magento-engcom-team commented 5 years ago

Hi @shikhamis11, here is your Magento instance. Admin access: https://i-21860-2-3-develop.instances.magento-community.engineering/admin Login: admin Password: 123123q Instance will be terminated in up to 3 hours.

shikhamis11 commented 5 years ago

@i95devdivya this issue is also coming in community versions.

magento-engcom-team commented 5 years ago

:white_check_mark: Confirmed by @shikhamis11 Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-98807, MAGETWO-98808 were created

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

hostep commented 5 years ago

I don't think this is a valid bug report, it is expected that you get an error and you should then manually modify the url key so it becomes unique, no? (Hope I understood the issue correctly because I can't view the screencast, needs Flash Player, is that still a thing these days?)

shikhamis11 commented 5 years ago

@hostep most of the merchants don't fill the url key manually while creating products and this is very common to have same name while creating product so in my opinion the behavior should be similar like skus.

hostep commented 5 years ago

Hmm, I wasn't even aware of this SKU auto-generation. But I just tested and you are right, it automatically changes. This feels really strange though, the SKU field is such and important field, and then Magento auto generates some value to avoid conflicts with existing SKU's. Not sure if that is right.

But I can see the point that it is convenient to auto generate url keys so they are unique. I think url keys are important as well, but maybe most people consider it less important then myself. And it also gets auto generated when duplicating products, so then ok, maybe this is a valid issue.

shikhamis11 commented 5 years ago

@yvechirko yes it should

magento-engcom-team commented 5 years ago

Hi @AlexandrKozyr. 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:

orlangur commented 5 years ago

There is nothing to fix here, this is intended behavior. Unlike Magento 1 we give full control over SEO for merchants in Magento 2, thus we do not encourage random numeric suffixes appearing.