Add link to disable non-required core modules for upgrading

Senpai - September 6, 2007 - 17:28
Project:Drupal Administration Menu
Version:5.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

How hard would it be to write a sql query that selected all modules that didn't start with 'modules/', and were also STATUS = 1?? I'm imagining a button that would disable all non-core modules for the site, in preparation for an upgrade.

To take this even further, if each contrib/custom module's name & status was saved into a db field before the site was upgraded, reversing this process after the upgrade would be a hell of a lot less painful as well, dontcha think?

#1

Chris Johnson - November 20, 2007 - 22:21
Assigned to:Anonymous» Chris Johnson

I will do this one.

#2

sun - January 13, 2008 - 13:44

Good idea!

Steps to implement:

  1. Display button/link to "Disable all non-core modules" (if variable util_modules_disabled is not set).
  2. On click,
    • gather all those modules
    • store them in a variable util_modules_disabled
    • disable them in the admin/build/modules form and submit it
  3. Display a button/link to "Re-enable all disabled non-core modules."
  4. On click,
    • retrieve list of disabled modules from util_modules_disabled
    • enable them/submit the admin/build/modules form
    • Delete the util_modules_disabled variable.

#3

Senpai - June 12, 2008 - 04:08
Version:5.x-1.x-dev» 6.x-2.3

The 5.x version of this module is effectively dead, so let's focus on the 6.x branch for future development.

#4

sun - June 12, 2008 - 04:35
Project:Utility» Drupal Administration Menu
Version:6.x-2.3» 5.x-2.x-dev
Component:User interface» Code
Assigned to:Chris Johnson» Anonymous

I have implemented a quite similar feature into Drupal Administration Menu that allows to disable/re-enable all "developer" modules in one fell swoop. Doing this one should be quite easy, and I really would like to provide this feature to the grand crowd of admin_menu users.

Thus, moving over to admin_menu's queue. And because that would really help folks trying to upgrade from D5, I'm hereby downgrading this issue for 5.x.

#5

sun - June 12, 2008 - 07:52
Title:Please add a button to disable all non-essential modules» Add link to disable non-required-core modules for upgrading

Better title.

#6

Senpai - June 14, 2008 - 18:28

I totally love this idea! admin_menu it is then! I use admin_menu on every one of my sites anyway, and encourage everyone else to do so.

#7

pwolanin - June 16, 2008 - 01:08

I think starting with 6.x all updates will run even if the modules are disabled - i.e. there may be no point to implementing this for 6.x.

#8

Senpai - June 16, 2008 - 15:28

No no, Peter, this would be for core upgrades so contrib modules can all be disabled before the event. You wouldn't want a 5.x contrib active after you upgraded core to 6, would you?

#9

sun - July 14, 2008 - 21:26
Title:Add link to disable non-required-core modules for upgrading» Add link to disable non-required core modules for upgrading

Well, pwolanin actually tried to say: It does not matter if contrib modules are enabled or disabled during an upgrade to D6. All update functions in all install files will be executed during an upgrade.

However, that sounds really scary. Can anyone confirm this behavior? If this is really the case, this issue does not make sense at all.

#10

darumaki - August 1, 2008 - 18:54

Why not create a menu that disables all modules prior to upgrading since this has to be done anyway, the admin menu is perfect for this.

#11

sun - August 1, 2008 - 20:26

@darumaki: See comment #9.

#12

darumaki - August 2, 2008 - 03:41

oh I see, so when upgrading to 6 we didn't have to disable the modules ?

 
 

Drupal is a registered trademark of Dries Buytaert.