Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-6000

civicrm_og_sync isn't adding new GroupContacts as OG members

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.2
    • Fix Version/s: 3.1.4
    • 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' ) )

      { return; }
      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.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              erico Eric Orton
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: