Delete forum data on uninstall

Created on 24 March 2014, over 10 years ago
Updated 13 August 2023, over 1 year ago

Problem/Motivation

Forum provides default configuration and content including fields, a node-type, a vocabulary and a taxonomy term.
Until now we were unsure about what should happen to that when you uninstall forum.

Proposed resolution

We've settled on what should happen is:

  1. For correct dependency management, and to unblock #2140511: Configuration file name collisions silently ignored for default configuration β†’ , all of the forum module's supplied configuration should be removed when the module is uninstalled. This means its vocabulary, its node type, and its field.
  2. The taxonomy field should have a dependency on the taxonomy vocabulary, ensuring that the field data must be purged first, then the field deleted, then the vocabulary deleted. If the field data has not been purged, then the module cannot be uninstalled.
  3. If other config entities have added the taxonomy field, they too are subject to the same rules.
  4. Forum nodes must be deleted before the module is uninstalled (same as #2).
  5. Forum taxonomy terms must be removed before the vocabulary can be deleted (same as #2 - as the 'forum_container' field will dictate this too).
  6. Configuration entities can have enforced dependencies. This means that we can ensure that node.type.forum will be removed when the forum module is uninstalled. We've implemented a generic solution so that all configuration entities can do this.

Remaining tasks

Review patch

User interface changes

Can't uninstall forum whilst content exists.

API changes

None

Original report by @beejeebus β†’

over in #1776830-100: [META-1] Installation and uninstallation of configuration provided by a module that belongs to another module's API β†’ , we decided on the rules for what should happen when a module is uninstalled.

this patch should make forum behave that way - only remove configuration entities during uninstall if there is a dependency issue.

geez i wish pings worked, oh hai larowlan.

πŸ“Œ Task
Status

Fixed

Version

8.0 ⚰️

Component

forum.module

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States tjtj

    This arose for me in D10.1.2. I needed to uninstall forums because the table has no primary key. I deleted the forum instances as the uninstall tole me to do, but now I still cannot uninstall forum because it says the forums have content. The above patch seems to be installed.
    How do I fix this?

Production build 0.71.5 2024