diff --git a/CRM/Contribute/Form/Task/TaskTrait.php b/CRM/Contribute/Form/Task/TaskTrait.php index 2534bb0a551d..04e64a349bfe 100644 --- a/CRM/Contribute/Form/Task/TaskTrait.php +++ b/CRM/Contribute/Form/Task/TaskTrait.php @@ -114,7 +114,9 @@ public function getIDs() { * @throws \CRM_Core_Exception */ protected function calculateIDS() { - if ($this->controller->get('id')) { + // contact search forms use the id property to store the selected uf_group_id + // rather than entity (contribution) IDs, so don't use the property in that case + if (!$this->controller instanceof CRM_Contact_Controller_Search && $this->controller->get('id')) { return explode(',', $this->controller->get('id')); } $ids = $this->getSelectedIDs($this->getSearchFormValues());