3

I noticed that I can't just "disable" a module in Drupal 8. As disabling it deletes all the config data of that module and completely uninstalls it. There are times I just want to disable a module to see if that is causing issues, but I have no way to keep its config data intact like how D7 can just disable, but not uninstall.

How would one do something like this in D8?

1
  • No, modules are uninstalled or installed now. There is no in-between state like 7 of disabled. Commented Feb 8, 2017 at 21:19

1 Answer 1

6

https://www.drupal.org/node/2225029

The long and the short of it is that you cant. This option is no longer available in Drupal and it was a conscious decision to remove the ability to disable a module because:

  • Because upgrades of some contrib module don't actually work (and can't be made to work) if upgrading when they are disabled.
  • Because data left behind by a disabled module that is later re-enabled causes integrity issues and cruft.
  • Some upgrades left behind data loss due to things like unexpected dependencies, plugins or hooks being unavailable at key times - when things were disabled. .. that issue (https://drupal.org/node/1199946) is several hundred arguments long, so It's unfair to over-summarize.
3
  • I always thought title of that issue summarized it nicely: "Disabled modules are broken beyond repair..." Commented Feb 8, 2017 at 21:31
  • seems like they are looking to bring back this enable/disable feature: drupal.org/node/2081873 --- bottom line: there are legitimate use cases for enable/disable a module. (Ex. Say your on vacation and you saw a bug on your website in one of the modules u made. You can't uninstall it as you have a bunch of settings tied to it. Your best option is to disable it. But you can't currently... ) Commented Feb 8, 2017 at 22:47
  • "they" have been looking since the issue was committed more than 3 years ago and there was zero activity on it since 2015. I wouldn't expect much there Commented Feb 8, 2017 at 23:43

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.