Just attempted an upgrade of a site from date 6.x-2.0rc6 to 6.x-2.3 and update.php never successfully finishes.
(Yes, I know 6.x-2.0rc6 is an old version, but this issue should also apply when upgrading from versions newer than 6.x-2.0rc6.)
Diagnosis:
Update.php lists available updates date:6005 and date_api:6002-6005. The updates date_api:6002-6005 runs first, creates a table {date_format}, and then renames it to {date_formats}. Update date:6005 then runs, and never finishes, because it is checking for the existence of a table {date_format} before proceeding, but {date_format} does not exist and *will not exist*. It has already been renamed to {date_formats}.
A workaround would be to get all users to upgrade to 6.x-2.2 first before attempting to upgrade to 6.x-2.3. This may be a satisfactory workaround, and perhaps you don't need to make any code fixes, but you should at least be aware of this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | 535270_date_upgrade_1.patch | 1.15 KB | owen barton |
| #20 | 535270_date_upgrade.patch | 912 bytes | anarcat |
| #19 | 535270_date_upgrade.patch | 1.01 KB | anarcat |
| #6 | date_update_6005_2.patch | 1002 bytes | agileware |
| #5 | date_update_6005.patch | 1.28 KB | David_Rothstein |
Comments
Comment #1
bengtan commentedComment #2
bengtan commentedOne possibility is to change line 534 in date_update_6005() from:
from:
to:
Comment #3
Leeteq commentedPatch here:
http://drupal.org/node/535008
Comment #4
bengtan commentedSorry, this is different from http://drupal.org/node/535008. Please read the original post again. Thanks.
Comment #5
David_Rothstein commentedI confirmed that this is a problem, although I'm pretty sure 6.x-2.0rc6 is the most recent release for which it would occur (since it looks like the 2.0 release of Date is when that update function was first added...)
Looking at the affected code, the suggestion in #2 above makes sense to me, so here it is as a patch.
Comment #6
agileware commentedThe patch works for me too.
Sorry to be picky but there are a couple of unnecessary lines in the #5 patch so I have made a slightly cleaner version. It is against 6.x-2.x-dev.
Comment #7
pastk commentedsubscribing
Comment #8
woodybrando commentedHi,
I'm having the same problem and was wondering if anyone could tell me how to apply the patch.
thx, jayson
lostvalley.org
Comment #9
agileware commentedCheck out this how to - http://drupal.org/patch/apply
This patch will apply with
patch -p0 < date_update_6005_2.patch
Comment #10
woodybrando commentedthx Justin for the quick reply. Which directory should I be in when i run that command?
Oops, just answered my own question. I ran that command from /var/www/sites/all/modules/ and it returned this message:
patching file date/date/date.install
thx again for the help Justin!
jayson
lostvalley.org
Comment #11
agileware commentedGenerally you put the file in the folder of the module you are patching and then run the command from that same folder.
Comment #12
caillou commentedThe patch works for me too.
Thanks very much !
Comment #13
seutje commentedmarked #522608: date.install update 6005 problem as duplicate, even though it's older, this one is more comprehensive and offers a patch
Comment #14
kmontyPatch #6 works great
Comment #15
karens commentedYep, the table got renamed from date_format to date_formats and this test didn't get updated to match that.
Comment #16
glass.dimly commentedDid as #9 and #10 suggested, and the patch worked great. Wish I didn't have to patch at all, wish it was in Date core. Probably it is in the 2.x branch.
Comment #17
glass.dimly commentedCan somebody roll this into the current branch of the date module? It's not in the 2.x branch.
Comment #18
kmontyComment #19
anarcat commentedThe ported (to 2.4) patch is attached, please commit.
Comment #20
anarcat commentedLast patch unintentionally fixed line endings, fixed.
Comment #21
agileware commentedPatch in #20 works for me for 6.x-2.4
Comment #22
owen barton commentedTested and can confirm that this fixed the issue
Updated patch for 2.x HEAD (#20 no longer applied)
Comment #23
karens commentedMy original fix worked for me, could never replicate a need for a further fix, but based on the above reports I went ahead and committed it. We don't patch existing releases, only the dev version gets patched.
Comment #25
jwilson3This bug is still apparent in the latest official release from sept 2009. Just updating the title ;)
If you hit this bug, you may want to subscribe to this thread: #837364: D6-2.x branch release?