cancel
Showing results for 
Search instead for 
Did you mean: 

Unique constraint violation found on edit product

Unique constraint violation found on edit product

Hi,

I have the message error: Unique constraint violation found when I edit product in my admin... I explain.

 

When I create a NEW product it's OK, but if I go to edit something on that product for example image, price, text, I have this error.

 

https://we.tl/t-0ajL7aTywy 

 

What is the solution or what do this conflict ?

 

I'm on Magento 2.3.3

 

image_2020_08_21T15_14_58_767Z.png

 

16 REPLIES 16

Re: Unique constraint violation found on edit product

@yapp1212 Are you using any custom module which have worked related to product save.

 

If so then try to disable that module and check if your problem is resolved.

 

Thanks

Re: Unique constraint violation found on edit product

No entension relating products I use

Re: Unique constraint violation found on edit product

@yapp1212 is this a fresh magento 2 setup or you have migrated the data?

 

Re: Unique constraint violation found on edit product

I have migrated my store from prestashop to Magento 2, I asked to the extension migration product and they tell my they only transfer data with is extension

Re: Unique constraint violation found on edit product

@yapp1212 Then the data is not migrated properly.
you are getting this error because you have duplicate entries in the database.

 

Re: Unique constraint violation found on edit product

How can I know if it's duplicate entries in the database.

Re: Unique constraint violation found on edit product

Here an information... I don't thing it's duplicate entries in the database because if I create a NEW NEW product and I set my option it's OK, BUT when I return to edit options, images, etc on this product I have the message error.

Re: Unique constraint violation found on edit product

@yapp1212 please check in code if there is any observer created on this "catalog_product save_commit_after" event.

Re: Unique constraint violation found on edit product

I know nothing from magento im a new user, I can tell me developper, tell me where he need to check ?