From 5abd3a5449e936a0a42fc8e179bfa4a407a5a40c Mon Sep 17 00:00:00 2001 From: larssandergreen Date: Sat, 19 Aug 2023 21:15:59 -0600 Subject: [PATCH] Make import parser external ID error message more helpful --- CRM/Import/Parser.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Import/Parser.php b/CRM/Import/Parser.php index f8ec36d4e4..5f6a1c44b8 100644 --- a/CRM/Import/Parser.php +++ b/CRM/Import/Parser.php @@ -2219,7 +2219,9 @@ abstract class CRM_Import_Parser implements UserJobInterface { } //check if external identifier exists in database if ($contactID && $foundContact['id'] !== $contactID) { - throw new CRM_Core_Exception(ts('Existing external ID does not match the imported contact ID.'), CRM_Import_Parser::ERROR); + throw new CRM_Core_Exception( + ts('Imported external ID already belongs to an existing contact with a different contact ID than the imported contact ID or than the contact ID of the contact matched on the entity imported.'), + CRM_Import_Parser::ERROR); } return (int) $foundContact['id']; } -- 2.25.1