I get the following errors while importing a contact CSV file. I hope somebody can help with the issue. Civicrm 5 latest with WP 5 latest and the error is same with both PHP 5 and 7.2.
"Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
DB Error: constraint violation
Error Details
Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`wp_23ye3`.`civicrm_address`, CONSTRAINT `FK_civicrm_address_master_id` FOREIGN KEY (`master_id`) REFERENCES `civicrm_address` (`id`) ON DELETE SET NULL), 1452
Additional Details:
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -3
[message] => DB Error: constraint violation
[mode] => 16
[debug_info] => INSERT INTO civicrm_address (contact_id , location_type_id , is_primary , is_billing , street_address , supplemental_address_1 , city , state_province_id , postal_code , country_id , manual_geo_code , master_id ) VALUES ( 10 , 1 , 1 , 0 , 'Lakhimi Nagar Hatigaon' , 'Dispur' , 'Guwahati' , 1204 , '781006' , 1101 , 0 , 0 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`wp_23ye3`.`civicrm_address`, CONSTRAINT `FK_civicrm_address_master_id` FOREIGN KEY (`master_id`) REFERENCES `civicrm_address` (`id`) ON DELETE SET NULL)]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_address (contact_id , location_type_id , is_primary , is_billing , street_address , supplemental_address_1 , city , state_province_id , postal_code , country_id , manual_geo_code , master_id ) VALUES ( 10 , 1 , 1 , 0 , 'Lakhimi Nagar Hatigaon' , 'Dispur' , 'Guwahati' , 1204 , '781006' , 1101 , 0 , 0 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`wp_23ye3`.`civicrm_address`, CONSTRAINT `FK_civicrm_address_master_id` FOREIGN KEY (`master_id`) REFERENCES `civicrm_address` (`id`) ON DELETE SET NULL)]
[to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_address (contact_id , location_type_id , is_primary , is_billing , street_address , supplemental_address_1 , city , state_province_id , postal_code , country_id , manual_geo_code , master_id ) VALUES ( 10 , 1 , 1 , 0 , 'Lakhimi Nagar Hatigaon' , 'Dispur' , 'Guwahati' , 1204 , '781006' , 1101 , 0 , 0 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`wp_23ye3`.`civicrm_address`, CONSTRAINT `FK_civicrm_address_master_id` FOREIGN KEY (`master_id`) REFERENCES `civicrm_address` (`id`) ON DELETE SET NULL)]"]
)"
wp_23ye3
.civicrm_address
, CONSTRAINTFK_civicrm_address_master_id
FOREIGN KEY (master_id
) REFERENCEScivicrm_address
(id
) ON DELETE SET NULL), 1452" The some additional details...