Page MenuHomePhabricator

Fatal error after installation when using LocalisationUpdate
Closed, DeclinedPublic

Description

I installed MW1.21rc1 on Windows and IIS with all extensions enabled. I then got a fatal error of type MWException. The details show that I had no cache directory configured. This was not a (mandatory) option in the install dialogue, though.

No cache directory configured

Backtrace:

#0 C:\Inetpub\wwwroot\wikidata\extensions\LocalisationUpdate\LocalisationUpdate.class.php(553): LocalisationUpdate::filename('de')
#1 C:\Inetpub\wwwroot\wikidata\extensions\LocalisationUpdate\LocalisationUpdate.class.php(36): LocalisationUpdate::readFile('de')
#2 [internal function]: LocalisationUpdate::onRecache(Object(LocalisationCache), 'de', Array)


Version: 1.22.0
Severity: major

Details

Reference
bz46885

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:41 AM
bzimport set Reference to bz46885.

It's an installer problem, adding Mark.
The installer should be able to do the configuration steps as described by [[mw:MLEB]].

(In reply to comment #1)

It's an installer problem, adding Mark.
The installer should be able to do the configuration steps as described by
[[mw:MLEB]].

Why is it? And why should it?

The installer doesn't have support for $random extension configuration

(In reply to comment #2)

The installer doesn't have support for $random extension configuration

Please define $random. This is only about extensions bundled with the installer.

(In reply to comment #3)

(In reply to comment #2)

The installer doesn't have support for $random extension configuration

Please define $random. This is only about extensions bundled with the
installer.

Random being any extension.

We don't bundle LocalisationUpdate

  1. Export extensions for inclusion

if dir > '1.20':

		extensions = ['ConfirmEdit', 'Gadgets', 'Nuke', 'ParserFunctions', 'PdfHandler', 'Renameuser', 'SpamBlacklist', 'Vector', 'WikiEditor']

elif dir > '1.17':

		extensions = ['ConfirmEdit', 'Gadgets', 'Nuke', 'ParserFunctions', 'Renameuser', 'Vector', 'WikiEditor']

else:

		extensions = []

(In reply to comment #4)

We don't bundle LocalisationUpdate

I don't know if it was bundled properly, but it was: see bug 43815 comment 6.
https://www.mediawiki.org/w/index.php?title=MediaWiki_1.21&oldid=695111#Bundled_extensions still says so.

I just did a sanity test after bundling and made sure it worked. More testing wasn't done on my part.

I do not remember who requested LU -- me? -- but I did say it would be bundled more than once. If there was a reason not to bundle it, there was plenty of chance to raise the issue then.

Finally, I know there isn't currently support for bundling $RANDOM_EXTENSION in MW, but I would like to get that problem fixed for most extensions.

(In reply to comment #6)

I just did a sanity test after bundling and made sure it worked.

Then that's call this one bug fixed; other issues will need other reports.

Fresh install of MediaWiki 1.22.0. Only the bundled LocalisationUpdate extension was enabled in the installer. Navigating to any page after setup and using the generated LocalSettings.php (adding error_reporting( E_ALL ); ini_set( 'display_errors', 1 ); $wgShowExceptionDetails = true; to get a stack trace):

[95fa66e8] /index.php Exception from line 549 of /home/www/lib/mediawiki-1.22.0/extensions/LocalisationUpdate/LocalisationUpdate.class.php: No cache directory configured

Backtrace:

#0 /home/www/lib/mediawiki-1.22.0/extensions/LocalisationUpdate/LocalisationUpdate.class.php(561): LocalisationUpdate::filename(string)
#1 /home/www/lib/mediawiki-1.22.0/extensions/LocalisationUpdate/LocalisationUpdate.class.php(36): LocalisationUpdate::readFile(string)
#2 [internal function]: LocalisationUpdate::onRecache(LocalisationCache, string, array)
#3 /home/www/lib/mediawiki-1.22.0/includes/Hooks.php(199): call_user_func_array(string, array)
#4 /home/www/lib/mediawiki-1.22.0/includes/GlobalFunctions.php(3877): Hooks::run(string, array)
#5 /home/www/lib/mediawiki-1.22.0/includes/cache/LocalisationCache.php(853): wfRunHooks(string, array)
#6 /home/www/lib/mediawiki-1.22.0/includes/cache/LocalisationCache.php(442): LocalisationCache->recache(string)
#7 /home/www/lib/mediawiki-1.22.0/includes/cache/LocalisationCache.php(365): LocalisationCache->initLanguage(string)
#8 /home/www/lib/mediawiki-1.22.0/includes/cache/LocalisationCache.php(281): LocalisationCache->loadSubitem(string, string, string)
#9 /home/www/lib/mediawiki-1.22.0/languages/Language.php(2337): LocalisationCache->getSubitem(string, string, string)
#10 /home/www/lib/mediawiki-1.22.0/includes/cache/MessageCache.php(802): Language->getMessage(string)
#11 /home/www/lib/mediawiki-1.22.0/includes/cache/MessageCache.php(729): MessageCache->getMessageFromFallbackChain(LanguageEs, string, string, boolean)
#12 /home/www/lib/mediawiki-1.22.0/includes/Message.php(878): MessageCache->get(string, boolean, LanguageEs)
#13 /home/www/lib/mediawiki-1.22.0/includes/Message.php(560): Message->fetchMessage()
#14 /home/www/lib/mediawiki-1.22.0/includes/Message.php(649): Message->toString()
#15 /home/www/lib/mediawiki-1.22.0/includes/Title.php(375): Message->text()
#16 /home/www/lib/mediawiki-1.22.0/includes/Wiki.php(121): Title::newMainPage()
#17 /home/www/lib/mediawiki-1.22.0/includes/Wiki.php(137): MediaWiki->parseTitle()
#18 /home/www/lib/mediawiki-1.22.0/includes/Wiki.php(530): MediaWiki->getTitle()
#19 /home/www/lib/mediawiki-1.22.0/includes/Wiki.php(467): MediaWiki->main()
#20 /home/www/lib/mediawiki-1.22.0/index.php(49): MediaWiki->run()
#21 {main}

  • Bug 59948 has been marked as a duplicate of this bug. ***
  • Bug 59614 has been marked as a duplicate of this bug. ***

I had this error to and I found the solution:

I'm using MW 1.22.1 that I downloaded today, and got the same error.

Following the instruction on mw.org ([[mw:Extension:LocalisationUpdate]] and https://www.mediawiki.org/w/index.php?title=MediaWiki_Language_Extension_Bundle&oldid=864409#Add.2Fupdate_your_LocalSettings.php),
you only need to add the following code in the LocalSettings.php

$wgLocalisationUpdateDirectory = "$IP/cache";

I might have accidentally fixed this in my rewrite https://gerrit.wikimedia.org/r/#/c/119944/

Does someone want to test with this patch?

Lovely! Once merged to master, also needs to be backported to 1.21 and 1.22 (it's compatible with 1.19 too in theory).

Doesn't cherry-pick cleanly. If someone wants to take this on, then we can do it.

You would be better off by just picking the master of LU. It has been rewritten (with compatibility in mind) to support the json i18n format.

Removing target milestone that was in the past.

If you want this in a specific release, have a good reason AND you are willing to find resources to fix this bug, feel free to change it to something appropriate.

Status of this ticket is unclear (whether the patch in comment 12 fixed this).
Does anybody know? Has this still happened after that patch had been included?

Also removing 'Backport_to_Stable' flag request as per comment 14 to 16.

The patch is in another branch, it can't have helped yet.

Nemo: So where is the "patch to review" located?
I don't see any link to a patch which still needs a review...

(In reply to Andre Klapper from comment #19)

I don't see any link to a patch which still needs a review...

The patch and review (test) request is in comment 12.

(In reply to Nemo from comment #20)

(In reply to Andre Klapper from comment #19)

I don't see any link to a patch which still needs a review...

The patch and review (test) request is in comment 12.

The patch has already been reviewed and merged, hence removing PATCH_TO_REVIEW status again and setting status to UNCONFIRMED as it's unclear whether this bug still exists. Testing whether the merged patch fixes this bug report is welcome but expressed via the keyword 'testme' already.

The patch has NOT been merged in REL1_22

There is no patch yet in Gerrit to review and potentially merge into REL1_22...

I think the backporting ship has sailed by now. Let's consider this fixed.

Nemo_bis changed the task status from Resolved to Declined.Jan 28 2015, 6:31 AM