From eb0010b8e60502965ededb3e4908622d74693a0f Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Wed, 21 Nov 2018 09:24:56 +0530 Subject: [PATCH] dev/core#540 - Civicrm Contact Dashboard returns fatal error --- CRM/Contribute/Form/Search.php | 8 +++++--- CRM/Contribute/Page/DashBoard.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CRM/Contribute/Form/Search.php b/CRM/Contribute/Form/Search.php index c31c0733f0..194a44ff49 100644 --- a/CRM/Contribute/Form/Search.php +++ b/CRM/Contribute/Form/Search.php @@ -173,10 +173,12 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search { * Build the form object. */ public function buildQuickForm() { - parent::buildQuickForm(); - $this->addContactSearchFields(); + if ($this->isFormInViewOrEditMode()) { + parent::buildQuickForm(); + $this->addContactSearchFields(); - CRM_Contribute_BAO_Query::buildSearchForm($this); + CRM_Contribute_BAO_Query::buildSearchForm($this); + } $rows = $this->get('rows'); if (is_array($rows)) { diff --git a/CRM/Contribute/Page/DashBoard.php b/CRM/Contribute/Page/DashBoard.php index 920a0c0325..244ba72482 100644 --- a/CRM/Contribute/Page/DashBoard.php +++ b/CRM/Contribute/Page/DashBoard.php @@ -108,7 +108,7 @@ class CRM_Contribute_Page_DashBoard extends CRM_Core_Page { $this->preProcess(); $controller = new CRM_Core_Controller_Simple('CRM_Contribute_Form_Search', - ts('Contributions'), CRM_Core_Action::BROWSE + ts('Contributions'), NULL ); $controller->setEmbedded(TRUE); -- 2.25.1