Clean up on uninstall

Created on 2 July 2023, 12 months ago

Problem/Motivation

Installing G2 and configuring it creates various kinds of data, and not all of them are removed by Drupal core when uninstalling the module.

To leave a clean system after uninstalling, the module should clean up all the data which core does not remove automatically.

Steps to reproduce

  • Install a fresh Drupal 10 instance
  • Export config, dump DB
  • Install G2 on a fresh instance
  • Enable both filters on at least one format
  • Configure all values
  • Customize the G2 view displays
  • Run a cron to auto-rotate the WOTD
  • Place all blocks in the block structure page.
  • Creates 3 entries
  • Create another node pointing to these entries
  • Uninstall the module
  • Export config, dump DB
  • Compare exports and dump

Proposed resolution

Add an hook_uninstall implementation to clean up the data not cleaned by default.
Possibly add a "pre-uninstall" task using the module features to ease the uninstall.

Remaining tasks

Run the analysis
Implement cleanup steps

User interface changes

None expected unless a pre-uninstall step is added

API changes

None.

Data model changes

None.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France fgm Paris, France

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

Comments & Activities

  • Issue created by @fgm
  • First commit to issue fork.
  • πŸ‡«πŸ‡·France fgm Paris, France

    @sonam_sharma I see you created a fork but I don't see any commit on it. It's better for you not to work on multiple issues at the same time if you actually plan on delivering them.

  • πŸ‡«πŸ‡·France fgm Paris, France
Production build 0.69.0 2024