Skip to content

Issue #34. Correctly remove field data, info and instance when uninstalling#113

Merged
argiepiano merged 1 commit intobackdrop-contrib:1.x-2.xfrom
argiepiano:1.x-2.x-issue-34
May 27, 2022
Merged

Issue #34. Correctly remove field data, info and instance when uninstalling#113
argiepiano merged 1 commit intobackdrop-contrib:1.x-2.xfrom
argiepiano:1.x-2.x-issue-34

Conversation

@argiepiano
Copy link
Copy Markdown
Collaborator

Fixes #34.

Explanation: there were two problems:

  1. Field og_membership_request not being removed at all (field info, field instance and data). This happens also in the D7 version. The entity to which it's attached, og_membership, has been deleted and therefore the removal of the field needed some special treatment
  2. Other OG fields attached to core entities were marked as deleted (info and instance), but the table was not removed. Running cron took care of removing everything. So, to solve this without waiting until cron ran, I used field_purge_batch at the end of the uninstall hook, as recommended in some D7 posts.

Tested thoroughly - working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant