Page MenuHomePhabricator

Upgrade from 1.26.4 to latest LTS
Closed, ResolvedPublic6 Estimated Story Points


Actually is running MediaWiki 1.26.4 but some time is passed since 2015 and now this version is no longer supported.

We should upgrade the installation to assure maximum support to latest security patches (some of them were not back-ported) and maximum support for post-2015 features like VisualEditor, the Extension:Thanks and other awesome things that could be appreciated by Wikimedia Italia members.

In short we should take some time to:

  • assure a backup
  • check if upgrade is feasible on the same server
  • upgrade from 1.26.4 to latest LTS 1.37
  • eventually adopt the cute Debian mediawiki package maintained by User:Legoktm
  • bonus point: track A/B configuration changes of our LocalSettings.php in Wikimedia Gerrit or whatever code hosting the community is discussing now between Phabricator and/or GitLab and/or GitHub and/or a nextCloud directory called asd

Also after the upgrade we could wait some time (few days?) before installing our new extensions, in order to test the fresh upgrade as-is and be sure that everything works without regressions.

(This was imported from here)

Related Objects

Event Timeline

valerio.bozzolan renamed this task from Upgrade from to latest LTS to Upgrade from 1.26.4 to latest LTS.Nov 23 2020, 7:03 PM
valerio.bozzolan triaged this task as Medium priority.
valerio.bozzolan updated the task description. (Show Details)
valerio.bozzolan set the point value for this task to 6.

gvf already did most of the work here; the upgrade is blocked on pending debugging.

gvf already did most of the work here; the upgrade is blocked on pending

To be honest with that bug I really got the feeling it's better to conclude our upgrade. Now we have PHP 7.3 (year 2018) while running MediaWiki 1.26.4 (year 2015). That's not unlikely to be a bug related to this combination. I would avoid investing time in troubleshooting 1.26.4 and instead I would just upgrade to 1.35 to eventually draw a line on this bug... or further investigate otherwise.

I forgot to mention that yesterday I made some progresses here playing with a private/dummy MediaWiki instance based on the Wikimedia Italia's production LocalSettings.php (configuration that was kindly shared by @Nemo_bis and Gvf some days ago).

First of all. The good news. Few explosions, guys! Yeeh!

Precisely I tried the MediaWiki 1.35 packaged for Debian GNU/Linux buster-backports. I mean the one packaged by User:Legoktm, my hero.

I was able to adapt our configuration file and see a MediaWiki 1.35 running. The Extension:Lockdown works. VisualEditor works!

For the record, note that now VisualEditor is a MediaWiki core extension so we don't need to maintain another fancy stuff or NodeJS services. There's a Wikimedia Foundation blog post about this topic:

What to do now:

  1. audit the Lockdown extension a little bit
    1. verify all the MediaWiki's known security vulnerabilities just to tighten our panties
  2. play with VisualEditor
    1. whooooa *click* *click* VisualEditor whoa!
    2. VisualEditor go brrr!
    3. etc.
  3. plan the real migration in production
  4. proceed with the other stuff

we don't need to maintain another fancy stuff or NodeJS services

That makes things easier, but T260201 remains a blocker for T268529 until confirmed fixed.

As for the upgrade itself, the question is whether MediaWiki 1.35 can support basic functionalities such as wikitext editing (however degraded) while the API is disabled.

So we're running in good old T16944 / but it's unclear why. The UTF-8 locales are installed in the OS and configured on MediaWiki's side, safe mode is not enabled, nothing changed in PHP on this front , everything works fine in a PHP shell on latest Devuan.

We've not confirmed that the it_IT.UTF-8 locale was available when Apache was last (re)started.

Recent versions of MediaWiki moved from wfShellExec() to the Shellbox library.

I tried to do a ./maintenance/update.php from 1.26.4 to 1.35.6 but after some minutes it exploded like described in T212428: includes/Revision/RevisionStore.php: Main slot of revision (number) not found in database!

Populating ar_rev_id...
MediaWiki\Revision\RevisionAccessException from line 1296 of /var/www/wikina/mediawiki-1.35.6/includes/Revision/RevisionStore.php: Main slot of revision not found in database. See T212428.
#0 /var/www/wikina/mediawiki-1.35.6/includes/Revision/RevisionStore.php(1224): MediaWiki\Revision\RevisionStore->constructSlotRecords('3718', Object(Wikimedia\Rdbms\ResultWrapper), 1, Object(Title))
#1 /var/www/wikina/mediawiki-1.35.6/includes/Revision/RevisionStore.php(1220): MediaWiki\Revision\RevisionStore->loadSlotRecords('3718', 1, Object(Title))
#2 /var/www/wikina/mediawiki-1.35.6/includes/Revision/RevisionStore.php(1335): MediaWiki\Revision\RevisionStore->loadSlotRecords('3718', 0, Object(Title))
#3 [internal function]: MediaWiki\Revision\RevisionStore->MediaWiki\Revision\{closure}()
#4 /var/www/wikina/mediawiki-1.35.6/includes/Revision/RevisionSlots.php(175): call_user_func(Object(Closure))
#5 /var/www/wikina/mediawiki-1.35.6/includes/Revision/RevisionSlots.php(117): MediaWiki\Revision\RevisionSlots->getSlots()
#6 /var/www/wikina/mediawiki-1.35.6/includes/Revision/RevisionRecord.php(192): MediaWiki\Revision\RevisionSlots->getSlot('main')
#7 /var/www/wikina/mediawiki-1.35.6/includes/Revision/RevisionRecord.php(175): MediaWiki\Revision\RevisionRecord->getSlot('main', 1, NULL)
#8 /var/www/wikina/mediawiki-1.35.6/includes/cache/MessageCache.php(1202): MediaWiki\Revision\RevisionRecord->getContent('main')
#9 /var/www/wikina/mediawiki-1.35.6/includes/libs/objectcache/wancache/WANObjectCache.php(1529): MessageCache->{closure}(false, 86400, Array, NULL, Array)
#10 /var/www/wikina/mediawiki-1.35.6/includes/libs/objectcache/wancache/WANObjectCache.php(1376): WANObjectCache->fetchOrRegenerate('wikina:messages...', 86400, Object(Closure), Array, Array)
#11 /var/www/wikina/mediawiki-1.35.6/includes/cache/MessageCache.php(1222): WANObjectCache->getWithSetCallback('wikina:messages...', 86400, Object(Closure))
#12 /var/www/wikina/mediawiki-1.35.6/includes/libs/objectcache/BagOStuff.php(149): MessageCache->{closure}(3600)
#13 /var/www/wikina/mediawiki-1.35.6/includes/cache/MessageCache.php(1224): BagOStuff->getWithSetCallback('wikina:messages...', 3600, Object(Closure))
#14 /var/www/wikina/mediawiki-1.35.6/includes/cache/MessageCache.php(1126): MessageCache->loadCachedMessagePageEntry('Mainpage', 'it', 'ace2fe76bcbf135...')
#15 /var/www/wikina/mediawiki-1.35.6/includes/cache/MessageCache.php(1034): MessageCache->getMsgFromNamespace('Mainpage', 'it')
#16 /var/www/wikina/mediawiki-1.35.6/includes/cache/MessageCache.php(1005): MessageCache->getMessageForLang(Object(Language), 'mainpage', true, Array)
#17 /var/www/wikina/mediawiki-1.35.6/includes/cache/MessageCache.php(947): MessageCache->getMessageFromFallbackChain(Object(Language), 'mainpage', true)
#18 /var/www/wikina/mediawiki-1.35.6/includes/language/Message.php(1320): MessageCache->get('mainpage', true, Object(Language))
#19 /var/www/wikina/mediawiki-1.35.6/includes/language/Message.php(878): Message->fetchMessage()
#20 /var/www/wikina/mediawiki-1.35.6/includes/language/Message.php(970): Message->toString('text')
#21 /var/www/wikina/mediawiki-1.35.6/includes/Title.php(669): Message->text()
#22 /var/www/wikina/mediawiki-1.35.6/maintenance/populateArchiveRevId.php(213): Title::newMainPage()
#23 /var/www/wikina/mediawiki-1.35.6/maintenance/populateArchiveRevId.php(118): PopulateArchiveRevId::makeDummyRevisionRow(Object(Wikimedia\Rdbms\MaintainableDBConnRef))
#24 /var/www/wikina/mediawiki-1.35.6/maintenance/populateArchiveRevId.php(63): PopulateArchiveRevId::checkMysqlAutoIncrementBug(Object(Wikimedia\Rdbms\MaintainableDBConnRef))
#25 /var/www/wikina/mediawiki-1.35.6/maintenance/includes/LoggedUpdateMaintenance.php(45): PopulateArchiveRevId->doDBUpdates()
#26 /var/www/wikina/mediawiki-1.35.6/includes/installer/DatabaseUpdater.php(1421): LoggedUpdateMaintenance->execute()
#27 /var/www/wikina/mediawiki-1.35.6/includes/installer/DatabaseUpdater.php(554): DatabaseUpdater->populateArchiveRevId()
#28 /var/www/wikina/mediawiki-1.35.6/includes/installer/DatabaseUpdater.php(517): DatabaseUpdater->runUpdates(Array, false)
#29 /var/www/wikina/mediawiki-1.35.6/maintenance/update.php(181): DatabaseUpdater->doUpdates(Array)
#30 /var/www/wikina/mediawiki-1.35.6/maintenance/doMaintenance.php(107): UpdateMediaWiki->execute()
#31 /var/www/wikina/mediawiki-1.35.6/maintenance/update.php(253): require_once('/var/www/wikina...')
#32 {main}

So I tried an ./maintenance/populateContentTables.php and I was able to execute the update again with success.

valerio.bozzolan claimed this task.

For the records, this was the minimum working procedure:

  • first run populateContentTables.php
  • then run update.php

I absolutely do not know why this does not happen automagically.

If you have time, see: