Products

Error: Database Unique Constraint Error

What this error means and how to resolve it

What is this error pertaining to?

This error refers to a SKU not being unique (and therefore, it cannot be saved).
image-Jul-26-2024-05-28-39-4916-PM

Why does this error occur?

This issue commonly arises when a Product is duplicated without modifying the system-generated 'SKU-duplicate' SKU.
Subsequently, when attempting to duplicate the SKU again at a later point, the system reuses 'SKU-duplicate', which is already assigned to the initial duplicate.

Screen Shot 2024-07-26 at 10.30.38 AM

How to resolve it

There are a few options:

  1. Use the original duplicate.
  2. Delete the original duplicate.
  3. Change the SKU on the duplicate so that you can duplicate the Product again.

How was it missed?

These can often be missed because the duplicated Product likely has the Admin Status set to 'Not available'.

As a result, it will not show up when searching for the SKU of the original Product because the filter is set to display only products with an Admin Status of 'available' by default.