Data Processor, SQL error - Duplicate column name 'participant_payment_participant_id' when a Data Processor is configured to use two or more Participant Sources
Data Processor, SQL error - Duplicate column name 'participant_payment_participant_id' when a Data Processor is configured to use two or more Participant Sources.
Reproduced in Data Processor 1.35 and 1.36
CiviCRM logs an SQL error.
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="SELECT COUNT(*) AS count FROM (SELECT DISTINCT `organisation`.`id` AS `organisation_contact_id`, `organisation`.`display_name` AS `organisation_contact_name`, `individual`.`id` AS `contact_id_contact_id`, `individual`.`display_name` AS `contact_id_contact_name`, `participant_training_1_participant_payment`.`participant_id` AS `participant_payment_participant_id`, `participant_training_1_participant_payment`.`contribution_id` AS `participant_payment_contribution_id`, `event`.`title` AS `event_1_title`, `event`.`start_date` AS `event_1_start_date`, `participant_training_2_participant_payment`.`participant_id` AS `participant_payment_participant_id`, `participant_training_2_participant_payment`.`contribution_id` AS `participant_payment_contribution_id`, `event_2`.`title` AS `event_2_title`, `event_2`.`start_date` AS `event_start_date` FROM `civicrm_contact` `organisation` LEFT JOIN `civicrm_value_safe_connecti_4` `organisation_Safe_Connections_Agency` ON `organisation`.`id` = `organisation_Safe_Connections_Agency`.`entity_id` AND (`organisation_Safe_Connections_Agency`.`safe_connections_local_agency_nu_18` IS NOT NULL ) INNER JOIN `civicrm_relationship` `relationship` ON `relationship`.`contact_id_b` = `organisation`.`id` AND (`relationship`.`relationship_type_id` IN (5) AND `relationship`.`is_active` = 1) INNER JOIN `civicrm_contact` `individual` ON `individual`.`id` = `relationship`.`contact_id_a` AND (`individual`.`is_deceased` = 0 AND `individual`.`is_deleted` = 0 AND `individual`.`contact_type` = 'Individual') INNER JOIN `civicrm_participant` `participant_training_1` ON `participant_training_1`.`contact_id` = `individual`.`id` LEFT JOIN `civicrm_participant_payment` `participant_training_1_participant_payment` ON `participant_training_1`.`id` = `participant_training_1_participant_payment`.`participant_id` INNER JOIN `civicrm_event` `event` ON `event`.`id` = `participant_training_1`.`event_id` LEFT JOIN `civicrm_loc_block` `event_locblock` ON `event`.`loc_block_id` = `event_locblock`.`id` INNER JOIN `civicrm_participant` `participant_training_2` ON `participant_training_2`.`contact_id` = `individual`.`id` LEFT JOIN `civicrm_participant_payment` `participant_training_2_participant_payment` ON `participant_training_2`.`id` = `participant_training_2_participant_payment`.`participant_id` INNER JOIN `civicrm_event` `event_2` ON `event_2`.`id` = `participant_training_2`.`event_id` LEFT JOIN `civicrm_loc_block` `event_2_locblock` ON `event_2`.`loc_block_id` = `event_2_locblock`.`id` WHERE 1 AND `organisation`.`is_deleted` = 0 AND `organisation`.`contact_type` = 'Organization' AND `participant_training_1`.`status_id` IN (2) AND `event`.`event_type_id` IN (9) AND `participant_training_2`.`status_id` IN (2) AND `participant_training_2`.`role_id` IN ('1') AND `event_2`.`event_type_id` IN (8) ORDER BY `organisation_contact_name` ASC) `count_combined_sql_data_flow` [nativecode=1060 ** Duplicate column name 'participant_payment_participant_id']"]
Agileware Ref: CIVICRM-1702