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

Prevent CiviCRM Group Roles Sync from trying to sync to nonexistent groups

    Details

    • Documentation Required?:
      None

      Description

      I traced a very strange bug in a client's site to civicrm_group_roles. It turns out they had a rule syncing a Drupal role to a CiviCRM group which had been deleted. The result is that an API_Exception is raised, causing a more-or-less unrelated database transaction to be rolled back.

      The civicrm_group_roles_add_remove_groups() function already does an API lookup to determine whether or not the group is a smart group; I've modified it a bit so we can validate that the group still exists.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pittstains Frank J. Gómez
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: