I Am getting error when I am removing .html from Category URL Suffix. Error is Unique constraint violation found.

Anyone have genuine solution for this.


  • it means you have used same url rewrites for two entities, you can look into url_rewrite table for it. – Anas Mansuri Jun 14 '19 at 5:28
  • @Shiwani have you resolved an issue? – Chirag Patel Jun 14 '19 at 8:22

This can be caused by duplicate entries for the same product in url_rewrite database table.

You can check duplicate entries using below query.

SELECT * FROM url_rewrite WHERE entity_type = 'product'

To resolve your issue Follow this link

I hope it helps.

| improve this answer | |
  • No, I didn't resolve this – Shomita Jun 14 '19 at 8:24
  • Have you tried the above answer? where did you stick? – Chirag Patel Jun 14 '19 at 8:27
  • I did all the steps. But still getting error at time of removing .html from Category URL Suffix – Shomita Jun 14 '19 at 8:52
  • You may get this error(Unique constraint violation found) only on when there is some duplicate record or other databases issue. so you have to look into the database to resolve your issue. – Chirag Patel Jun 14 '19 at 9:07
  • I deleted the records from url_rewrite and save the all categories. But still not working – Shomita Jun 14 '19 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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