FilterUninstallValidator stops uninstall when module being uninstalled is only one using a filter format

Created on 9 November 2015, about 9 years ago
Updated 29 October 2023, about 1 year ago

Problem/Motivation

When trying to uninstall mailchimp_campaign, FilterUninstallValidator returns an error because mailchimp_campaign is using that filter. It's good to check whether other modules are using that filter, but since we are uninstalling mailchimp_campaign, it seems like it should get through the validation without worrying about its own filter.

The error from #2585215: Mailchimp Campaign cannot be uninstalled β†’

The following extensions will be uninstalled: mailchimp_campaign
Do you really want to continue? (y/n): y
exception 'Drupal\Core\Extension\ModuleUninstallValidatorException' with message 'The following reasons prevents the modules from [error]
being uninstalled: Provides a filter plugin that is in use in the following filter formats: MailChimp
campaign' 

And from the duplicate issue πŸ› Impossible to uninstall a module that provides a config override for a filter Closed: duplicate .
The Filter module implements an UninstallValidator that prevents a module from being uninstall if it provides a filter plugin that's actively being used by some filter. To resolve it, a site admin must simply remove the filter plugin from any active filters.

However, if the filter plugin is enabled on a filter by means of a configuration override, then there is no way to remove it. If the module providing the override is the one you want to uninstall, it's impossible.

Steps to reproduce

TBA

Proposed resolution

TBA

Remaining tasks

Steps to reproduce
Patch, with test
review
commit

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
ExtensionΒ  β†’

Last updated 9 days ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States jami

Live updates comments and jobs are added and updated live.
  • Needs manual testing

    The change/bugfix cannot be fully demonstrated by automated testing, and thus requires manual testing in a variety of environments.

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.

Production build 0.71.5 2024