Enable all the Date modules. Now disable them bit by bit as you can. You eventually get to the point where you have Date API and Date Timezone left. Any attempt to disable Date Timezone fails, the module is automtically re-enabled. This is due to the following code in date_api_init()

  // The timezone module was originally going to be optional
  // but too many things break without it.
  if (!module_exists('date_timezone')) {
    module_enable(array('date_timezone'));
  }

This creates a circular dependency. You can't disable Date API without first disabling Date Timezone (due to .info dependencies), however any attempt to disable Date Timezone calls Date API's init hook and causes it to be re-enabled. Commenting out the module_enable line allows you to disable Date Timezone, but I don't know what the consequences of that are.

Comments

KarenS’s picture

That code is in there partly to fix #228860: Upgrading a module with a newly added dependencies breaks things badly since without it you end up with a bizarre condition of having the Date Timezone module shown as an empty, disabled checkbox on the modules list, so that there is no way to enable it. It is also because #211182: Updates run in unpredictable order which sometimes creates fatal errors, and a whole long list of other install/update problems I had when I didn't force that module to be enabled. I tried a variety of ways of including other files but this is the only way that worked reliably.

That said, I didn't think about trying to disable everything, but I guess we could do the reverse here or figure out some way that this won't happen if you really are trying to disable things. That will take some thought.

KarenS’s picture

Status: Active » Fixed

This should be fixed in the latest commit for both the D5 and D6 versions.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.