Remove orphaned configuration when a module providing the plugin is removed

Created on 14 March 2025, about 1 month ago

Problem/Motivation

The module creates configuration entities on the plugin's form submission, like localized_config.%my_module.yml, but it doesn't remove them, when the plugin instance is removed.

Steps to reproduce

Add a localized_config plugin in a custom module, fill out the form, save and export config. A new configuration file is created. Uninstall the custom module --> the configuration file is still present.

Proposed resolution

It would be nice to have an automatism to remove config that is related to a localized_config plugin, when this plugin doesn't exist. There's a hook_modules_uninstalled() in module.api.php (Drupal 10.4) and could be sufficient -- maybe there's even an event, i don't know

Feature request
Status

Active

Component

Code

Created by

🇩🇪Germany drupatz

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

Comments & Activities

Production build 0.71.5 2024