dev/core/-/issues/3786 💩 Matching by External / Contact ID always matches contacts with ID < 10 for Participant importer and possibly others because return params is not an array #24153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Matching by External / Contact ID always matches contacts with ID < 10 for Participant importer and possibly others
This is due do an incorrectly replaced Error generation function in core commit 972906b (Merged for 5.51.0)
Steps to reproduce
Error: Import will execute and create Participant records associated all with Contact ID: 1 or Contact ID: 2 (or another ID < ID:10). Not matching against the correct Contact ID.
Before
Cannot import Event Participants correctly. Participants are created but associated with the wrong Contact.
After
Can import Event Participants correctly. Participants are created and associated with the correct Contact.
Technical Details
Bug introduced due to recent refactor of import code,see core commit 972906b
Comments
This bug gets the 💩 icon because it took a very long time to track down and caused imports to fail, making a customer very unhappy 😬
Gitlab, https://lab.civicrm.org/dev/core/-/issues/3786
Agileware Ref: CIVICRM-2025