From b83d85def8d73067b984af6314d0b87cab69c17e Mon Sep 17 00:00:00 2001 From: Jon Goldberg Date: Mon, 10 Jan 2022 13:11:57 -0500 Subject: [PATCH 1/2] fix accessing member/contribution count when not enabled --- CRM/Contact/BAO/Contact.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index 9cbbb6567ba0..329ed5e42127 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -2735,10 +2735,16 @@ public static function getCountComponent($component, $contactId, $tableName = NU return CRM_Core_BAO_Note::getContactNoteCount($contactId); case 'contribution': - return CRM_Contribute_BAO_Contribution::contributionCount($contactId); + if (array_key_exists('CiviContribute', CRM_Core_Component::getEnabledComponents())) { + return CRM_Contribute_BAO_Contribution::contributionCount($contactId); + } + return FALSE; case 'membership': - return CRM_Member_BAO_Membership::getContactMembershipCount((int) $contactId, TRUE); + if (array_key_exists('CiviMember', CRM_Core_Component::getEnabledComponents())) { + return CRM_Member_BAO_Membership::getContactMembershipCount((int) $contactId, TRUE); + } + return FALSE; case 'participant': return CRM_Event_BAO_Participant::getContactParticipantCount($contactId); From cb82f6f120a53190e78d6142580a43584a89dbf4 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Tue, 11 Jan 2022 21:35:33 -0500 Subject: [PATCH 2/2] quickfix for fulltext search drupal block --- templates/CRM/Block/FullTextSearch.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/CRM/Block/FullTextSearch.tpl b/templates/CRM/Block/FullTextSearch.tpl index 9a7299a39b98..7363708abb5b 100644 --- a/templates/CRM/Block/FullTextSearch.tpl +++ b/templates/CRM/Block/FullTextSearch.tpl @@ -25,7 +25,7 @@