Group Relationships are not removed when Group is deleted

Created on 24 April 2025, 3 days ago

Problem/Motivation

When deleting a group, the groups relationships within the group_relationship and group_relationship_field_data tables are not removed. This causes issues when using the group.membership_loader service outside of the group module, as the membership relationship still exists, but the group ID from the relationship can no longer be found as a group entity. A user should not have to remove relationships tied to a group prior to deleting the group.

Steps to reproduce

  • Create Group
  • Add some memberships
  • See that relationships were added in the database tables referenced
  • Delete group
  • Relationships should still exist within these tables

Proposed resolution

Upon deletion of the group, rows that have a corresponding gid in table group_relationship_field_data should be removed, along with their corresponding id in the group_relationship table, and any other related data that I may have overlooked.

πŸ› Bug report
Status

Active

Version

3.3

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States glaze Minnesota

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024