Fix profile search listings columns are sometimes blank.
authoranemirovsky <anemirovsky@giantrabbit.com>
Fri, 10 Mar 2023 20:48:19 +0000 (12:48 -0800)
committeranemirovsky <anemirovsky@giantrabbit.com>
Fri, 10 Mar 2023 20:48:19 +0000 (12:48 -0800)
commit8ca7655a981510bf9ec41d96169c9255a01c5fbc
tree8ddb89b9bc3258e545c188158da5c3ff81154e37
parent0b35e5fd06997e014aa10b395d7a7395292a1f2c
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