Import of contributions (update existing) -> error for all contributions "No matching Contact found for ()"
Drupal 9.4, CiviCRM 5.52.2, PHP 8.0
- Go to /civicrm/contribute/import
- choose a csv file contribution data
- Settings: Update existing contributions
- in mapping we connect a column "contribution id" with the CiviCRM field "Contribution id (match to contribution record)"
- the main purpose in our case is to update the contribution status
We used a testing CSV with 10 entries and for each of them there is the same error: "No matching Contact found for ()". For all contributions in the CSV the contributions in CiviCRM and the contacts exists. The error appears in CRM/Contribute/Import/Parser/Contribution.php on line 481 within the check
empty($formatted['contact_id'])
Here I get confused: I am not able to choose contact id as a matching field but it seems this method expects this value to be set. In our CSV there is a column with the contact id - but as I said it cannot be matched to a contact id field in CiviCRM.
As this worked before (updating existing contributions with the field matching without contact id set) for years something might have changed here.