I have been trying to save a category but get the message “URL key for specified store already exists.” every time.
I am getting same issue with code level when i try to save multiple categories and have parent as well as it’s child category.
- go to Products > Categories
- Select the Category
- Click Save
Message: URL key for specified store already exists. comes up and nothing is saved
I found solution:-
some people says this is magento 2 bug but there is some new features of magento 2 for security reason. According to this if product does not contain blank name or same name then it create url with any string and again that will happen it shows “URL key for specified store already exists“.
This issue will occurred with multi store so you can solve by below steps:
- if you are getting error in import products then you need to export csv and check if same URL exists (if same product have then add -1, -2 so… on) ad some more string to differentiate url.
- Now again upload csv again now error gone and all products imported successfully. Same thing need to do in programmatically.
Thank you! this is working for me.