I’ve migrated my site to a production server and all seems to have gone well apart from one problem: I can’t save changes to products. When I do I get the following error:
SQLSTATE: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`folk_magento/catalogindex_minimal_price`, CONSTRAINT `FK_CATALOGINDEX_MINIMAL_PRICE_CUSTOMER_GROUP` FOREIGN KEY (`customer_group_id`) REFERENCES `customer_group` (`customer_group_id`) ON DELE)
I’ve searched the forum and found two suggestions, neither of which worked; first was to make sure my tables are InnoDB (they are), second to run a SQL query to find errors. The query is this:
SELECT * FROM catalog_category_product_index
LEFT JOIN catalog_product_entity
ON catalog_category_product_index.product_id = catalog_product_entity.entity_id
WHERE catalog_product_entity.entity_id IS NULL
I’ve run it as is, but I need to change it to match my particular problem; however, I don’t know what changes I need to make - or, indeed, if this is even the right solution.