Consultation module does not cleanly uninstall

Created on 19 February 2024, about 1 year ago
Updated 5 March 2024, about 1 year ago

Problem/Motivation

If you uninstall the consultation module, it leaves behind the content type and fields and such. This prevents you from uninstalling some dependencies (entity_reference_revisions and webform) and prevents you from installing the module again.

Steps to reproduce

  1. Install/configure Drupal 9 or 10
  2. Install consultation module and dependencies
  3. Uninstall consultation
  4. Try uninstalling entity_reference_revisions and webform and it will show an error
  5. Go to content types and you will see the consultation type is still there
  6. Try to install the consultation module again and you will get an error

Proposed resolution

Update the code to include an uninstall hook which deletes the module's configuration if all the consultation nodes are gone. It is expected that the admin deletes these nodes themselves in case they don't realize that uninstalling the module will remove the content type.

Remaining tasks

  • Add update hook
  • Review and test
  • Commit

User interface changes

User will see an error when trying to uninstall the consultation module when there are consultation nodes. Once there are no nodes, they will be able to uninstall the module and will no longer see the consultation content type in the UI.

API changes

Data model changes

Config will be deleted but the model is the same.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

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

Comments & Activities

Production build 0.71.5 2024