Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
While running the upgrade script in Drupal 6.24 (upgrading from 6.22), I got the following error:
An error occurred. http://example.com/update.php?id=1&op=do
Fatal error: Call to undefined function locale_inc_callback() in /home/www-data/example.com/www/modules/locale/locale.install on line 236
OS: Debian 5.0.9
Web server: Apache 2.2.9 (aka. 2.2.9-10+lenny11)
PHP: 5.2.6 (5.2.6.dfsg.1-1+lenny13)
(However I guess this bug is not related to the environment I'm running Drupal in.)
Comment | File | Size | Author |
---|---|---|---|
#12 | adding-locale-1425260-12.patch | 405 bytes | mgifford |
#6 | log upgrade script from 6.24 (upgrading from 6.22) | 54.17 KB | bardill |
#6 | locale module enabled earlier | 27.71 KB | bardill |
Comments
Comment #1
müzso CreditAttribution: müzso commentedThe problem is most probably related to this patch:
http://drupal.org/node/504506
"Drupal.formatPlural incorrectly handle complex plural rules"
Comment #2
andypostAre you running update with drush or site/update.php ?
I see actual reason for D6 to run {some-module}.install without loading {some-module}.module
But it looks like it is because called function locale_inc_callback() lives inside locale.module
Comment #3
Gábor HojtsyWell, Drupal runs updates for disabled modules.
Comment #4
Gábor HojtsyAdded this to the known issues on http://drupal.org/drupal-7.12
My understanding is that is the underlying problem.
Comment #5
HTF CreditAttribution: HTF commentedI too have this problem
Comment #6
bardill CreditAttribution: bardill commentedSorry I don't understand the problem. Running the upgrade script from 6.24 (upgrading from 6.22), I got no error.
Locale module was enabled earlier and during the update (yes, I update drupal core without disabling the modules - see: http://drupal.org/node/1173012#comment-5252892)
Anyway it's a multi-language site and seems to work fine.
See the attachment. many thanks.
b
Comment #7
Gábor Hojtsy@boshadr: yes, the problem appears if you don't currently have the local module enabled (see the text in the note again), BUT you had it enabled before. Judging by your explanation (you have it enabled before and still have it enabled), you should not be affected.
Comment #8
HTF CreditAttribution: HTF commentedI can confirm this is true, I have just re-enabled the local module and the update script ran fine.
Comment #9
bardill CreditAttribution: bardill commented@Gábor Thanks. I confirm!
Update Drupal core without disabling the modules is a good way :) Thanks Carlos8f
Comment #10
andypostprobably we need
drupal_load('module', 'locale');
or just direct call to_locale_invalidate_js()
with locale.inc includeComment #11
Gábor Hojtsy@andypost: Yes, that looks like it.
Comment #12
mgiffordThis worked for me.
Comment #13
mgiffordOops.. changing status to needs review. This would be reason to put out a 6.25 release I assume.
Comment #14
bardill CreditAttribution: bardill commented@ mgifford yes, 6.25 I think it's the best way!
Comment #15
strawberrybrick CreditAttribution: strawberrybrick commentedhad same error when upgrading from 6.22 - > 6.24. Turned locale module on, re-ran update.php, no error, then turned locale module off.
Comment #16
motter CreditAttribution: motter commentedSame issue same solution.
Comment #17
DarrellDuane CreditAttribution: DarrellDuane commentedI applied this patch. I have upgraded two sites from 6.22 to 6.24 that both used to have the locale module enabled, but I disabled this module before running upgrade.php. The database upgrade worked fine in both cases.
Comment #18
Frogtown CreditAttribution: Frogtown commentedConfirming here on my end. Upgrading from 6.22 to 6.24 this happened, and we have never had the locale module running before. Enabled the module, ran update.php again and it ran fine.
Comment #19
andypostFixed means commited
Comment #20
salvisYes, #12 allows update.php to proceed.
Comment #21
venusrising CreditAttribution: venusrising commentedYes to #12. Enabled locale ran update and all went fine.
Comment #22
bardill CreditAttribution: bardill commentedConfirm #17
Many thanks.
Comment #23
izmeez CreditAttribution: izmeez commentedno errors on update with patch in #12 applied
Comment #24
bardill CreditAttribution: bardill commented@ Gábor - 6.25 release is in plan in the next days?
Comment #25
SyRenity CreditAttribution: SyRenity commentedHi.
About these who using Drush, what would be the best course of action?
Drush now reports to me every time there is nothing to update.
Is there a way to apply the fix manually?
Comment #26
pingers CreditAttribution: pingers commentedEDIT: Thanks for fixing it :)
Comment #27
Gábor Hojtsy@boshard: I'm tracking this one and #1425868: Duplicate entry of themes primary key in systems table of Drupal 6.24 (using Drush or Ægir), both would need to be fixed for a Drupal 6.25 to be out.
Comment #28
rockland CreditAttribution: rockland commentedSame problem, same solution as #7. Thank you!
Comment #29
bardill CreditAttribution: bardill commentedAlso here: same problem, same solution as #7!
Many thanks.
Comment #30
bardill CreditAttribution: bardill commented@ Gábor Many thanks for your great work!
Comment #31
aubjr_drupal CreditAttribution: aubjr_drupal commentedSame problem as #7, same solution as others (re-enable, run update, disable). Hope this is fixed in 6.25.
Comment #32
bardill CreditAttribution: bardill commented@Gábor 6.25 will be released with the usual time interval? 3/4 months?
Many thanks for your continued work.
b
Comment #33
Gábor Hojtsy@boshard: I think if we can be absolutely sure in this one and #1425868: Duplicate entry of themes primary key in systems table of Drupal 6.24 (using Drush or Ægir) is fixed too, then we can release on Feb 29th in the usual Drupal core release window (last Wed of month). I don't think we'd want to include any other fixes in 6.25, its best to not give any chance to mistakes.
Comment #34
bardill CreditAttribution: bardill commented@Gábor Many thanks for your great work!
Comment #35
ElegantSolutions CreditAttribution: ElegantSolutions commentedMy variation?
I have never used the locale, but just activating it was enough to get update to work.
Comment #36
coolhandlukek2 CreditAttribution: coolhandlukek2 commented#7 worked for me
Was running update.php and getting Fatal error: Call to undefined function locale_inc_callback() in /modules/locale/locale.install
Thanks @Gábor
Comment #37
weavie CreditAttribution: weavie commented#7 worked - I had locale enabled, disabled it some time ago, updated failed with error "Call to undefined function locale_inc_callback()".
Renabled locale, ran update, disabled locale.
thanks!
Comment #38
lgb CreditAttribution: lgb commented#7 is confirmed fix for me. Thank you!!
Comment #39
Gábor HojtsyThanks, committed, pushed. The current plan is that Drupal 6.25 will be released with this fix on Feb 29th.
Comment #40
weavie CreditAttribution: weavie commentedI'm seeing a recurring error now that might be related, but I'm not sure.
I had the above issue (#37) and thought it was resolved.
Now on each page load I am getting the following pairs of errors, one entry for each block on content or something, so multiple pairs of log entries on page load:
Invalid argument supplied for foreach() in /var/www/html/site/includes/common.inc on line 959.
strtr() [function.strtr]: The second argument is not an array in /var/www/html/site/includes/common.inc on line 976.
The reason why I think it could be related is because that section of common.inc deals with locale.
Any ideas or suggestions?
I've tried de-activating and uninstalling locale and content translation and then re-activating them but it's had no effect.
Thanks.
Comment #41
Gábor HojtsyDrupal 6.25 with this fix should be available in a matter of minutes at http://drupal.org/node/1461656 and at http://drupal.org/drupal-6.25
Comment #42
bardill CreditAttribution: bardill commentedMany thanks for your continued work!
Comment #43
SyRenity CreditAttribution: SyRenity commentedHi.
For drush users, will updating to 6.25 solve this issue even if previous update to 6.24 triggered this error (but still completed)?
Thanks.
Comment #44
Gábor HojtsyYes, it should.
Comment #45
SyRenity CreditAttribution: SyRenity commentedThanks for clarification.