We recently migrated and then upgraded a MediaWiki, and the upgrade was a major upgrade.

It run successfully, but then tome pages, such as the home page, showed errors like this:

MediaWiki\Revision\RevisionAccessException from line 1676 of /home/mysite/www/www/includes/Revision/RevisionStore.php: Main slot of revision 38921 not found in database!

We found several reports of this error online and the Mediawiki RevisionAccessException forum page on https://www.mediawiki.org/ suggests a solution. We tried that and found that using

$wgMultiContentRevisionSchemaMigrationStage = SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD;

in LocalSettings.php fixed the problem.

3 Comments

  • Rob Fantini

    so the fix got us to 1.34 . 1.35 and 1.36 do will not work for some pages. mw devs have added debug code. see https://gerrit.wikimedia.org/r/c/mediawiki/core/+/608982

    1.35 and 1.36 get this for some not all pages:
    MediaWiki internal error.

    Original exception: [56bad2df4e6702c51d2e0ed6] /mediawiki/index.php/User:Rob MediaWiki\Revision\RevisionAccessException from line 1296 of /var/www/mediawiki-1.35.3/includes/Revision/RevisionStore.php: Main slot of revision not found in database. See T212428.
    Backtrace:
    #0 /var/www/mediawiki-1.35.3/includes/Revision/RevisionStore.php(1224): MediaWiki\Revision\RevisionStore->constructSlotRecords(string, Wikimedia\Rdbms\ResultWrapper, integer, Title)
    #1 /var/www/mediawiki-1.35.3/includes/Revision/RevisionStore.php(1220): MediaWiki\Revision\RevisionStore->loadSlotRecords(string, integer, Title)

    thanks for helping us get to 1.34 .

Leave a Reply

Your email address will not be published. Required fields are marked *