From d0cfb4facaa2e4d6b48c34a3286377b1fc86b407 Mon Sep 17 00:00:00 2001 From: Jon Goldberg Date: Thu, 3 Dec 2020 19:16:14 -0500 Subject: [PATCH] Potential fix for 5.32+ unable to export contacts --- CRM/Export/BAO/ExportProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Export/BAO/ExportProcessor.php b/CRM/Export/BAO/ExportProcessor.php index 4e9581d1cf..ab63f36eea 100644 --- a/CRM/Export/BAO/ExportProcessor.php +++ b/CRM/Export/BAO/ExportProcessor.php @@ -797,7 +797,7 @@ class CRM_Export_BAO_ExportProcessor { list($select, $from, $where, $having) = $query->query(); $this->setQueryFields($query->_fields); $whereClauses = ['trash_clause' => "contact_a.is_deleted != 1"]; - if ($this->getRequestedFields() && ($this->getComponentTable())) { + if ($this->getRequestedFields() && $this->getComponentTable() && $this->getComponentTable() !== 'civicrm_contact') { $from .= " INNER JOIN " . $this->getComponentTable() . " ctTable ON ctTable.contact_id = contact_a.id "; } elseif ($this->getComponentClause()) { -- 2.25.1