OK, I accept

This site uses cookies. By using this site, you acknowledge and accept this.

Your basket is empty
Login not logged in

Full Knowledgebase Listing

Error: "Database Error: reference-key violation." when deleting a product

[#58] Last update 29 Dec 2014

When you attempt to delete a product from the back end of Kartris, you may see this error popup, and it is impossible to delete the product.

The most likely reason is that the product is subject to a promotion which has been used by at least one customer. Normally when you delete a product, any promotions associated with this will be deleted too. If however those promotions have been used at least once, they cannot be deleted as there are orders which are linked through to them for reference purposes. Therefore, the product itself cannot be deleted.

If you wish to clean up your store, we would suggest creating an archive category which is not live, and moving such products to this when they are no longer required. This way, they will still be present as required, but not live or spread around between other products which are live.

Powered by kartris