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

CiviGroup Roles Sync fails due to undeclared variable $gid

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 4.0.5
    • Fix Version/s: 4.0.6
    • Labels:
      None

      Description

      CiviGroup Roles Sync fails due to undeclared variable $gid in the file civicrm_group_roles.module. The error is

      Setup
      Drupal 7.8
      CiviCRM 4.0.5
      Apache

      Repro Steps
      1. Install working drupal and civicrm.
      2. enable user sync between drupal and civicrm
      3. add user in drupal, ensure a matching contact is created in civicrm
      4. create a new role in drupal called "employee"
      5. add user from (3) to employee role
      6. create group in civicrm called "our employees". Do not add contact into this group.
      7. In drupal modules, enable CiviGroup Roles Sync
      8. go to configure civigroup roles sync in drupal
      9. click add association rule
      10. select civicrm_group=our employees and drupal_role=employee
      11. click add association rule
      12. in drupal, click People in admin menu bar.
      13. click the user from (3)
      14. click edit
      15. de-select the checkbox for the employee role (remove them from it). Click the save button.
      16. select the checkbox for the employee role (add them from it). Click the save button.

      results:
      (1)A red error at the top.
      Notice: Undefined variable: gid in civicrm_group_roles_add_remove_groups() (line 584 of /home/electrog/drupal/sites/all/modules/civicrm/drupal/modules/civicrm_group_roles/civicrm_group_roles.module).

      expected:
      No error.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              diablodale Dale Phurrough (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: