Allow uninstalling modules with dependents by offering to recursively uninstall their dependents as well.

Created on 20 May 2009, over 15 years ago
Updated 3 August 2023, over 1 year ago

Problem/Motivation

Much like we force dependent modules to be enabled, it would be handy to be able to disable a module and its dependencies recursively. When there are several dependencies between modules, several successive rounds of disabling modules are required which takes a really considerable amount of time and makes the whole procedure tedious.

Proposed resolution

These two options are discussed:

A. Use Javascript to:

1) when a user clicks on a checked-disabled check box, enable and uncheck it, then recursively uncheck all modules which depend on that module and then all modules which depend on the modules which were just unchecked, etc. Could also display a popup message informing the user that unchecking this module will cause the following modules to be unchecked as well.

and/or

2) when a user unchecks a module, check if there are any modules which it requires and enable their check box, if possible.

B. Don't disable any check boxes on the form, and then when the form gets submitted, check if there are any additional modules which will need to be disabled and then ask the user if they would like to continue. Similar process to enabling module dependencies.

Remaining tasks

After enough discussion, the general consensus is to try and have as much consistency with the way things are done now when enabling modules that have dependencies. So we need to go with option B mentioned above where basically, when you click submit, Drupal would now tell you two things and get you to confirm that the following modules will be enabled and disabled:

1) List of modules which will now be enabled because they are dependencies for modules you want to enable.

2) List of modules which will now be disabled because 1 or more of the modules they depend on are being disabled.

Latest patch available for testing is in comment #21 below.

Related issues

#107038: Javascript to select module dependencies β†’

User interface changes

Any module can be selected to be disabled on the modules page (besides the always required core modules such as node and user). After submitting the page a confirmation is required to disable possible dependant modules.

API changes

none.

Original report by NancyDru

// Text of original report:

Much like we force dependent modules to be enabled, it would be might handy to be able to disable a module and its dependencies. I just went to disable Update (in this case, but it's not important which one) because of a problem I'm debugging and there were two levels of dependencies that meant I had to disable 3 times - way too much overhead.

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
ExtensionΒ  β†’

Last updated 10 days ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States NancyDru Boston

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

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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