While placing order from admin getting constraint violation error.

when I printed exception i am getting below error string,

Order saving error: SQLSTATE[23000]: Integrity constraint violation:
1062 Duplicate entry '0' for key 'PRIMARY', query was: INSERT INTO
`sales_order_grid` (`last_admin_edit`) VALUES (?)

Any idea what is the cause?

1 Answer 1


Error causing due to custom module attribute "last_admin_edit" added in sales_order_grid table. Made changes in custom module code.

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.