Skip to main content
MediaWiki: Main Slot of Revision not Found in Database
March 8, 2020

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 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 Replies to “MediaWiki: Main Slot of Revision not Found in Database”

  1. thank you ! i spent 20 hours on the upgrade from 1.32 and this was the key to completing the upgrade

  2. 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

    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.
    #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 .

Warning: Undefined array key "comment_author_url_web" in /home/galleryr/www/www/wp-content/themes/civihosting/functions.php on line 555

Leave a Reply

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