From 2c5ac293ad271cd12200f0a1e076e3ea09d09a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lussier?= Date: Wed, 19 Oct 2016 16:14:15 -0400 Subject: [PATCH] CRM-19545 Custom field groups missing from views Fix for CRM-19545 : "Custom field groups which do not directly extend the base 'Contact' disappear from Drupal view after applying patch CRM-18776" --- modules/views/components/civicrm.core.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/views/components/civicrm.core.inc b/modules/views/components/civicrm.core.inc index af55f5935..b068a1971 100644 --- a/modules/views/components/civicrm.core.inc +++ b/modules/views/components/civicrm.core.inc @@ -2911,7 +2911,7 @@ function _civicrm_core_data(&$data, $enabled) { while ($dao->fetch()) { // call getTree using $dao->id as groupID, $dao->extends as entityType, with possible subtypes in $dao->extends_entity_column_value - $extendsContactSubtype = (('Contact' === $dao->extends) && !empty($dao->extends_entity_column_value)); + $extendsContactSubtype = (in_array($dao->extends, array('Contact', 'Individual', 'Organization', 'Household')) && !empty($dao->extends_entity_column_value)); $contactSubtypes = !$extendsContactSubtype ? NULL : array_filter(explode(CRM_Core_DAO::VALUE_SEPARATOR, $dao->extends_entity_column_value)); $contactSubtypes = empty($contactSubtypes) ? NULL : $contactSubtypes; $data = civicrm_views_custom_data_cache($data, $dao->extends, $dao->id, $contactSubtypes);