CiviCRM 5.49.1 - CiviCRM Event, Scheduled Reminders that are created with repetition and "also Include" criteria crash the database during cron run, with error: "Not unique table/alias: 'r'"
CiviCRM Event, Scheduled Reminders that are created with repetition and "also Include" criteria crash the database during cron run, with error: "Not unique table/alias: 'r'"
This stems from the CRM_Event_ActionMapping class, which specifies a base table as "civicrm_event r" when it probably should be "civicrm_participant e", and a query is generated in the repetition check phase like "INSERT into civicrm_event r INNER JOIN civicrm_event r ..."
This only seems to apply to Scheduled Reminders created for the Event ("Event Reminders"?).
This is initially evidenced by Scheduled Reminders job failure as follows:
Entity: Job Action: send_reminder
Summary
Finished execution of Send Scheduled Reminders with result: Failure, Error message: DB Error: unknown error
Details
Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}
Full message:
Finished execution of Send Scheduled Reminders with result: Failure, Error message: DB Error: unknown error
It looks like this problem has been around since 2015.
As observed on CiviCRM 5.49.1
Agileware Ref: CIVICRM-1981