Have a question about CiviCRM? Get it answered quickly at the new CiviCRM Stack Exchange Q+A siteThis forum was archived on 25 November 2017. Learn more.How to get involved.What to do if you think you've found a bug.
Hi, I let Michael know you were looking for help on this so hopefully he'll be able to give some more direction as he knows this code quite well
1. i suspect your civicrm and drupal db are the same. in which case you dont need to add anything in settings.php
2. as mentioned in IRC, your best bet is to add some debugging code to:civicrm_views_custom_data_cache in drupal/modules/views/civicrm.views.incthat will probably give you an idea as to why those tables are not exposed to views
3. if a contact is not typed, it applies to all contacts (note that there is just one civicrm_contact table), so basically that is exposedlobo
ok, this file: civicrm_handler_filter_activityType.inc references State/Province:39 function title( ) {40 return t('State/Province');41 }which seems weird to me? I don't even know if this is where the problem is - I was just reading the source.
also, this file: civicrm_handler_field_custom.inc seems to be only about activities? Should it be renamed?I'm going to leave it there for the moment - I'm just confusing myself and not really helping.
4726 else {4727 $tree = CRM_Core_BAO_CustomGroup::getTree( $entity_type, CRM_Core_DAO::$_nullObject, null, $groupID);4728 }47294730 /* echo "entity type = $entity_type ||\n";4731 * echo "subtype = $subType ||\n";4732 * echo "GroupID = $groupID ||";4733 */4734 switch ($entity_type) {
4765 $data[$currentgroup['table_name']]['table']['group'] = t('CiviCRM Custom: ') . $currentgroup['title'];47664767 echo $currentgroup['title'];4768 echo " | ";4769 // Join this table to Contacts
4730 /* echo "entity type = $entity_type ||\n";4731 * echo "subtype = $subType ||\n";4732 * echo "GroupID = $groupID ||";4733 */4734 switch ($entity_type) {47354736 case "Contact":4737 case "Individual":4738 case "Household":4739 case "Organization":4740 $jointable = 'civicrm_contact';4741 break;4742 case "Event":4743 $jointable = 'civicrm_event';4744 break;4745 case "Participant":4746 $jointable = 'civicrm_participant';4747 break;4748 case "Contribution":4749 $jointable = 'civicrm_contribution';4750 break;4751 case "Activity":4752 $jointable = 'civicrm_activity';4753 break;4754 case "Relationship":4755 $jointable = 'civicrm_relationship';4756 break;4757 case "Membership":4758 $jointable = 'civicrm_membership';4759 break;4760 }47614762 foreach ($tree as $groupkey => $currentgroup) {4763 if ($groupkey == 'info') { return $data; } // dodges an invalid argument call after all the groups go through // have a look at what $tree outputs to to see why.47644765 $data[$currentgroup['table_name']]['table']['group'] = t('CiviCRM Custom: ') . $currentgroup['title'];47664767 echo $currentgroup['title'];4768 echo " | ";
4722 if ($style == 'Inline') { 4723 //echo "subtype = $subType --"; 4724 $tree = CRM_Core_BAO_CustomGroup::getTree( $entity_type, CRM_Core_DAO::$_nullObject, null, $groupID, $subType, null); 4725 } 4726 else { 4727 $tree = CRM_Core_BAO_CustomGroup::getTree( $entity_type, CRM_Core_DAO::$_nullObject, null, $groupID); 4728 }
327 if ( $subType ) { 328 $subType = CRM_Core_DAO::VALUE_SEPARATOR . $subType . CRM_Core_DAO::VALUE_SEPARATOR; 329 $strWhere = " 330 WHERE civicrm_custom_group.is_active = 1 331 AND civicrm_custom_field.is_active = 1 332 AND civicrm_custom_group.extends IN ($in) 333 AND ( civicrm_custom_group.extends_entity_column_value LIKE '%$subType%' 334 OR civicrm_custom_group.extends_entity_column_value IS NULL ) 335 "; 336 if ( $subName ) { 337 $strWhere .= " AND civicrm_custom_group.extends_entity_column_id = {$subName} "; 338 } 339 } else {
VALUE_SEPARATOR = "";
VALUE_SEPARATOR = "^A";
Database changedmysql> UPDATE civicrm_custom_group SET extends_entity_column_value = CONCAT(CHAR( 01 ), extends_entity_column_value, CHAR( 01 )) WHERE LOCATE( char( 01 ), extends_entity_column_value ) <= 0;Query OK, 0 rows affected (0.00 sec)Rows matched: 0 Changed: 0 Warnings: 0
if ( $subType ) { //$subType = CRM_Core_DAO::VALUE_SEPARATOR . $subType . CRM_Core_DAO::VALUE_SEPARATOR; $strWhere = "WHERE civicrm_custom_group.is_active = 1 AND civicrm_custom_field.is_active = 1 AND civicrm_custom_group.extends IN ($in) AND ( civicrm_custom_group.extends_entity_column_value LIKE '%$subType%' OR civicrm_custom_group.extends_entity_column_value IS NULL )"; if ( $subName ) { $strWhere .= " AND civicrm_custom_group.extends_entity_column_id = {$subName} "; } } else { $strWhere = "WHERE civicrm_custom_group.is_active = 1 AND civicrm_custom_field.is_active = 1 AND civicrm_custom_group.extends IN ($in) AND civicrm_custom_group.extends_entity_column_value IS NULL"; }