I'm not sure if this should be a bug report, or a task for adding documentation about how to upgrade, or if this is some weirdness which happens so rarely that it's not worth the bother to investigate further...

After updating Date to 5.x-2.1 I went to admin/content/types, added a field (which was not a date filed) to a content type which did not have any date fields, and suddenly had my screen half full of database warnings. After some trial and error, and more than one restore from backup, I found that the following resulted in a nice update without any errors:

  1. Update as normal (replace all Date files, run update.php)
  2. Go to admin/build/modules, discover that "Date Timezone" is greyed out and not checked, check "Date Popup" and save. Discover that "Date Timezone" is still greyed out but now checked
  3. Go to admin/content/types, edit all date fields. The field "Granularity" was not filled in, fill it in
  4. Get a message saying that the database need to be upgraded. Run update.php
  5. ...and now everything works fine!

I didn't copy the error messages, but I have backup of the site immediately before upgrade, so I can repeat the mess and take better notes if necessary. I updgraded CCK immediately before, no idea if this is related to the problem or not.

Comments

KarenS’s picture

Status: Active » Postponed (maintainer needs more info)

There is a hitch in the update from 5.1 to 5.2 because 5.2 includes a dependency on a new module. I've tried all kinds of things in the update to get this to work right, but apparently it's still not. There is actually a core bug causing this, it should be either automatically marking that new module as enabled or disable all the modules that are dependent on it, but instead it is marking it as disabled but enabling the modules that need it, making a real mess. This has been reported but not fixed in core.

I guess the best workaround is to disable all date modules before the upgrade, upgrade, then re-enable them and run update.php. When you re-enable them you will be forced to enable the timezone module. I will add that to the update instructions.

If you have a backup, try that process and see if it works better and report back.

zirvap’s picture

Status: Postponed (maintainer needs more info) » Active

Yes, this way it went fine :-)

What I did:

  1. Deactivated "Date 5.x-1.8" (Date copy wasn't active)
  2. Replaced all Date files. When going to module admin page, Date API was active, the other Date modules weren't
  3. Enabled Date. Got warning about Date depending on Date Timezone. Said yes to activating that one too
  4. Ran update.php (Select versions showed date_api module: 5000 and date module: 5200)
  5. ...and then I did the same things that had triggered the database warnings earlier, and now there were no problems
KarenS’s picture

Status: Active » Fixed

OK, I added this to the documentation in the handbook and also on the project page. Thanks for helping out :)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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