Clicking on Agenda tab in Events with civimobileapi extension causes fatal DB error
Running CiviCRM 5.51.1, CiviMobileAPI 6.0.1. Searched for this as an existing issue, did not find it.
A user tried to click on the Agenda tab when creating a new event (which is only there with the CiviMobileAPI extension enabled) and gets a network disconnection. The log file shows:
( [callback] => Array ( [0] => CRM_Core_Error [1] => exceptionHandler )
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => SELECT
esspeaker.id,
esspeaker.event_session_id,
esspeaker.speaker_id
, participant.id as participant_id,
contact.first_name,
contact.last_name,
contact.organization_name,
contact.job_title,
contact.image_URL,
contact.employer_id,
contact.display_name
FROM civicrm_civimobile_event_session_speaker esspeaker INNER join civicrm_participant participant ON participant.id = esspeaker.speaker_id LEFT join civicrm_contact contact ON contact.id = participant.contact_id WHERE (event_session_id IN (SELECT id FROM civicrm_civimobile_event_session WHERE event_id=194)) GROUP BY esspeaker.speaker_id LIMIT 25 OFFSET 0 [nativecode=1055 ** Expression #1 (closed) of SELECT list is not in GROUP BY clause and contains nonaggregated column 'civicrm_members.esspeaker.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by] [type] => DB_Error [user_info] => SELECT esspeaker.id, esspeaker.event_session_id, esspeaker.speaker_id , participant.id as participant_id, contact.first_name, contact.last_name, contact.organization_name, contact.job_title, contact.image_URL, contact.employer_id, contact.display_name FROM civicrm_civimobile_event_session_speaker esspeaker INNER join civicrm_participant participant ON participant.id = esspeaker.speaker_id LEFT join civicrm_contact contact ON contact.id = participant.contact_id WHERE (event_session_id IN (SELECT id FROM civicrm_civimobile_event_session WHERE event_id=194)) GROUP BY esspeaker.speaker_id LIMIT 25 OFFSET 0 [nativecode=1055 ** Expression #1 (closed) of SELECT list is not in GROUP BY clause and contains nonaggregated column 'civicrm_members.esspeaker.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by] [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="SELECT esspeaker.id, esspeaker.event_session_id, esspeaker.speaker_id , participant.id as participant_id, contact.first_name, contact.last_name, contact.organization_name, contact.job_title, contact.image_URL, contact.employer_id, contact.display_name FROM civicrm_civimobile_event_session_speaker esspeaker INNER join civicrm_participant participant ON participant.id = esspeaker.speaker_id LEFT join civicrm_contact contact ON contact.id = participant.contact_id WHERE (event_session_id IN (SELECT id FROM civicrm_civimobile_event_session WHERE event_id=194)) GROUP BY esspeaker.speaker_id LIMIT 25 OFFSET 0 [nativecode=1055 ** Expression #1 (closed) of SELECT list is not in GROUP BY clause and contains nonaggregated column 'civicrm_members.esspeaker.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by]"] )
I know one workaround is to disable the only_full_group_by sql_mode but would rather not do that. The current workaround is telling users to not click the Agenda tab.
Hopefully this is a relatively easy fix.
Michael