Page MenuHomePhabricator

MediaWiki 1.31 and earlier can't use LocalisationUpdate with GitHub now
Closed, DuplicatePublic

Description

LocalisationUpdate(especially LocalisationUpdate\GitHubFetcher) assumes local path of all components is same in that of remote repository of GitHub (default to LU).

But say, Language::getLocalisationCache()->getMessagesDirs()['oojs-ui'] is "$IP/resources/lib/oojs-ui/i18" in 1.32.0-wmf.20, even though that value in 1.32.0-wmf.22 is "$IP/resources/lib/ooui/i18n".

So php extensions/LocalisationUpdate/update.php does always fail in 1.31 and earlier. See below (I'm on 1.31.1):

[e75cfd94a702db8425e256ad] [no req]   Exception from line 33 of /path/to/your/wiki/extensions/LocalisationUpdate/includes/fetcher/GitHubFetcher.php: Unable to get directory listing for wikimedia/mediawiki
Backtrace:
#0 /path/to/your/wiki/extensions/LocalisationUpdate/includes/Updater.php(117): LocalisationUpdate\GitHubFetcher->fetchDirectory(string)
#1 /path/to/your/wiki/extensions/LocalisationUpdate/includes/Updater.php(138): LocalisationUpdate\Updater->fetchFiles(LocalisationUpdate\FetcherFactory, string)
#2 /path/to/your/wiki/LocalisationUpdate/update.php(61): LocalisationUpdate\Updater->execute(LocalisationUpdate\Finder, LocalisationUpdate\ReaderFactory, LocalisationUpdate\FetcherFactory, array)
#3 /path/to/your/wiki/maintenance/doMaintenance.php(94): Update->execute()
#4 /path/to/your/wiki/extensions/LocalisationUpdate/update.php(80): require_once(string)
#5 {main}

I found GitHubFetcher had tried to fetch files from https://api.github.com/repos/wikimedia/mediawiki/contents/resources/lib/oojs-ui/i18n that does not exists.

Maybe T176390 has the same cause.


Version: 1.32.0-wmf.20 and earlier
See Also my previously written post:
https://www.mediawiki.org/w/index.php?title=Extension_talk:LocalisationUpdate&oldid=2914680#Is_this_extension_only_working_with_the_latest_version_of_Mediawiki%3F

Event Timeline

Lens0021 renamed this task from MediaWiki 1.31 and earlier can't use LocalisationUpdate with Github to MediaWiki 1.31 and earlier can't use LocalisationUpdate with GitHub now.Oct 8 2018, 1:56 PM

Yep, seems like this should be merged into T176390. And prioritised for the release, because unlike before, this time the rename happened in core or a bundled extension, which makes it more important to handle in a way that at least doesn't crash.

Krinkle: to clarify, release of MediaWiki core or MLEB?

Definitely at least the former, since LU is bundled with the tarball.