From ec089f4bf3621b12975a7f8926c5af789a46f94d Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Mon, 21 Dec 2020 16:30:25 +0530 Subject: [PATCH] Fix fatal error on contribution summary report -> add to group action --- CRM/Report/Form.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index b70d4869e6..ceaca5ef39 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -4962,7 +4962,11 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a $select = preg_replace('/SELECT(\s+SQL_CALC_FOUND_ROWS)?\s+/i', $select, $this->_select); $sql = "{$select} {$this->_from} {$this->_where} {$this->_groupBy} {$this->_having} {$this->_orderBy}"; $sql = str_replace('WITH ROLLUP', '', $sql); + if (!$this->optimisedForOnlyFullGroupBy) { + CRM_Core_DAO::disableFullGroupByMode(); + } $dao = CRM_Core_DAO::executeQuery($sql); + CRM_Core_DAO::reenableFullGroupByMode(); $contact_ids = []; // Add resulting contacts to group -- 2.25.1