I need to create a new store view, but I get this error:

Integrity constraint violation: 1062 Duplicate entry 'studioline-4' for key 'URL_REWRITE_REQUEST_PATH_STORE_ID'

I checked the database, but there is only one entry for studioline

enter image description here

What can I do? Why is the error thrown?

I also deleted the "studioline" entry from the database, but I get the same error again.

2 Answers 2


Try to do re-indexing after deleting the duplicate entry from database.

Below are the step for reindexing via Magento 2 Admin

  • Log in to Magento 2 Admin and navigate to System → Index Management. You will see the panel above.

  • Select indexers, which has status Reindex Required, then select in Actions menu Update on Schedule.

  • Press Submit button to apply selected mode to indexers.


Reindexing via command line

  • bin/magento indexer:reindex
  • It was not helping, I still get the error.
    – Black
    Commented Dec 24, 2021 at 11:27

There were two CMS sites with the same URL-Key. I had to change the URL Key for one of them or delete one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.