Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.1.2
-
Fix Version/s: 3.1.4
-
Component/s: Drupal Integration Modules
-
Labels:None
Description
In civicrm_og_sync_civicrm_post the wrong class is being used to add a GroupContact:
case 'GroupContact':
require_once 'CRM/Bridge/OG/CiviCRM.php';
switch ( $op ) {
case 'create':
case 'edit':
if ( ! _civicrm_og_sync_set_context( 'civicrm' ) )
CRM_Bridge_OG_Drupal::groupContact( $objectID, $objectRef, 'add' );
break;
case 'delete':
if ( ! _civicrm_og_sync_set_context( 'civicrm' ) ) { return; }
CRM_Bridge_OG_Drupal::groupContact( $objectID, $objectRef, 'delete' );
break;
default:
break;
}
As you can see, 'CRM/Bridge/OG/CiviCRM.php' is loaded, but CRM_Bridge_OG_Drupal is used. The correct class to use in both instances here is CRM_Bridge_OG_CiviCRM as it contains the groupContact method which writes memberships to OG. This results in fatal errors when adding GroupContact's in CiviCRM.