I'm having kinda serious issue with CSV product import. When I'm trying to import only one product from CSV (for testing reasons) I get following error:
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (
admin_knygynas.catalog_product_entity_media_gallery, CONSTRAINTFK_CAT_PRD_ENTT_MDA_GLR_ATTR_ID_EAV_ATTR_ATTR_IDFOREIGN KEY (attribute_id) REFERENCESeav_attribute(attribute_id) ), query was: INSERT INTOcatalog_product_entity_media_gallery(attribute_id,entity_id,value) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATEentity_id= VALUES(entity_id)
Got this issue first time, searched where I can, but no solutions so far, sitting on this one for hours. I see that it tries to insert VALUES(?,?,?) into product media gallery entity, and it doesn't make any sense.
I exported CSV from Magento 1.7.2 version, and trying to import to 1.9.2. But i was reading somewhere that it doesn't make any difference. I did all the steps. Created missing attributes, imported categories with another module so everything there should be fine.