From 8ca7655a981510bf9ec41d96169c9255a01c5fbc Mon Sep 17 00:00:00 2001 From: anemirovsky Date: Fri, 10 Mar 2023 12:48:19 -0800 Subject: [PATCH] Fix profile search listings columns are sometimes blank. The bug is that the query results have the column names formatted like [location_type_machine_name]-[field_name], like "Work-email", while the code that handles rendering the row is looking for [location_type_display_name]-[field_name], like "Office_1-email". I've adjusted the code that handles rendering the row to instead use the machine name rather than the display name for the location type. This only becomes an issue if the location type display name has been changed from the default so it no longer matches the internal machine name. --- CRM/Profile/Selector/Listings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Profile/Selector/Listings.php b/CRM/Profile/Selector/Listings.php index 6aefb13117..8a14a5bf4d 100644 --- a/CRM/Profile/Selector/Listings.php +++ b/CRM/Profile/Selector/Listings.php @@ -488,7 +488,7 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR } $links = self::links($this->_map, $this->_editLink, $this->_linkToUF, $this->_profileIds); - $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id'); + $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', ['labelColumn' => 'name']); $names = []; static $skipFields = ['group', 'tag']; -- 2.25.1