I need Magento import expert - SQLSTATE[23000]: Integrity constraint violation: 1452

  • Posted:
  • Proposals: 18
  • Remote
  • #1471142
  • Expired
David A.Vigneshprabu C.Satya B.TeamMagento ..Exploreweb Store + 13 others have already sent a proposal.
  • 2

Description

Experience Level: Expert
General information for the website: Magento
Description of requirements/features: I've got a CSV of products that return the following SQL error on import. - Also attached as image.

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`XXXXXXXX_XXXXXXXXX`.`cataloginventory_stock_item`, CONSTRAINT `FK_CATINV_STOCK_ITEM_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_i), query was: INSERT INTO `cataloginventory_stock_item` (`manage_stock`,`use_config_manage_stock`,`qty`,`min_qty`,`use_config_min_qty`,`min_sale_qty`,`use_config_min_sale_qty`,`max_sale_qty`,`use_config_max_sale_qty`,`is_qty_decimal`,`backorders`,`use_config_backorders`,`notify_stock_qty`,`use_config_notify_stock_qty`,`enable_qty_increments`,`use_config_enable_qty_inc`,`qty_increments`,`use_config_qty_increments`,`is_in_stock`,`low_stock_date`,`stock_status_changed_auto`,`is_decimal_divided`,`product_id`,`stock_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

I've tried tried removing all products already in the DB via SQL Truncate, and re-running the import with no luck.
It seems to import only the first 3800 products, regardless of what they are.

The CSV is saved in UTF-8, also tried MS-DOS CSV - Both with the same result.
Extra notes:

New Proposal

Create an account now and send a proposal now to get this project.

Sign up

Clarification Board Ask a Question

  • Thanassis Z.

    Can we see the structure of the csv pls ?

  • David B.

    Are you in a rush or flexible on deadline?

  • TSOLUTIONS

    Lewis

    Issue is on the CSV, there is an attribute.

    Can you upload the CSV file?

  • Sufi S.

    Hi Lewis,
    Have you found someone for this fix ?