Magento2 Product Save – Unable to Save Product

magento2productsave

I am unable to save product from magento2 admin
Getting below error

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`catalog_product_entity`, CONSTRAINT `CAT_PRD_ENTT_ATTR_SET_ID_EAV_ATTR_SET_ATTR_SET_ID` FOREIGN KEY (`attribute_set_id`) REFERENCES `eav_attribute_set` (`attribute_set_id`) ON DELE), query was: UPDATE `catalog_product_entity` SET `attribute_set_id` = ?, `type_id` = ?, `sku` = ?, `has_options` = ?, `required_options` = ?, `created_at` = '2016-03-16 11:32:03', `updated_at` = '2016-09-15 11:48:26' WHERE (`entity_id`=21826)

Please help me to fix this issue

Best Answer

I believe that I got this when I added a product to an attribute set then removed the attribute set or modified it.

Try to delete the attribute set for that product if that is an option?

Related Topic