Skip to content

Magento 2: Change the “URL Key” and save the category “The value specified in the URL Key field would generate a URL that already exists.”

When change the “URL Key” and save the category then throw the below error.

This store Migrate Magento 1.9 to Magento 2.3.5-p1 and used multi store view.

Error:

The value specified in the URL Key field would generate a URL that already exists.
To resolve this conflict, you can either change the value of the URL Key field (located in the Search Engine Optimization section) to a unique value, or change the Request Path fields in all locations listed below:

- fitness-equipment/strength/kettlebells.html

- fitness-equipment/strength/dumbbells.html

- fitness-equipment/strongman/hammer.html

I have try below solution but not fixed the issue:

Solution 1)

    - Truncate the url_rewrite table. 
    - Generate category url via https://github.com/olegkoval/magento2-regenerate_url_rewrites module
    - use command for genrate the category url: php bin/magento ok:urlrewrites:regenerate --entity-type=category

Solution 2)

https://magento.stackexchange.com/questions/259845/migration-tool-causing-url-rewrite-duplicates-in-magento-2-leading-to-missing-ca

Solution 3)

- Install module for remove duplicate: https://github.com/cadencelabs/urldedup
    - Generate category url via https://github.com/olegkoval/magento2-regenerate_url_rewrites module
- use command for genrate the category url: php bin/magento ok:urlrewrites:regenerate --entity-type=category

Solution 4)

- When save edit "URL Key" and save the category then show the error list url.
- I have open that all error url in separate window and delete it.
- Then Generate category url via https://github.com/olegkoval/magento2-regenerate_url_rewrites module
- use command for genrate the category url: php bin/magento ok:urlrewrites:regenerate --entity-type=category

But still getting same error after implement above four solution. If any have idea about this critical issue then let me know.

Any help would be appreciated. Thanks!
enter image description here