Page MenuHomeMiraheze

Resetting wikis and then importing causes slot related errors
Open, LowPublic

Description

Tagging this as low for now as resets + imports aren't something that happen frequently at all. Basically whenever a wiki is reset (deleted + dropped) and then attempts are made to re-import content that was present on the wiki at the time (but not necessarily from the wiki itself, for example lately it was an import from Fandom) the error below appears. I've tried populateContentTables.php and resetting the CreateWiki cache but that didn't help. The only solution ends up being to import to a new wiki DB and then to rename that to the correct wiki.

MediaWiki\Revision\RevisionAccessException from line 1479 of /srv/mediawiki/w/includes/Revision/RevisionStore.php: Main slot of revision not found in database. See T212428.
#0 /srv/mediawiki/w/includes/Revision/RevisionStore.php(1409): MediaWiki\Revision\RevisionStore->constructSlotRecords('20334', Object(Wikimedia\Rdbms\ResultWrapper), 1, Object(Title))
#1 /srv/mediawiki/w/includes/Revision/RevisionStore.php(1405): MediaWiki\Revision\RevisionStore->loadSlotRecords('20334', 1, Object(Title))
#2 /srv/mediawiki/w/includes/Revision/RevisionStore.php(1518): MediaWiki\Revision\RevisionStore->loadSlotRecords('20334', 0, Object(Title))
#3 [internal function]: MediaWiki\Revision\RevisionStore->MediaWiki\Revision\{closure}()
#4 /srv/mediawiki/w/includes/Revision/RevisionSlots.php(167): call_user_func(Object(Closure))
#5 /srv/mediawiki/w/includes/Revision/RevisionSlots.php(126): MediaWiki\Revision\RevisionSlots->getSlots()
#6 /srv/mediawiki/w/includes/Revision/RevisionRecord.php(198): MediaWiki\Revision\RevisionSlots->hasSlot('main')
#7 /srv/mediawiki/w/includes/parser/Parser.php(3696): MediaWiki\Revision\RevisionRecord->hasSlot('main')
#8 /srv/mediawiki/w/includes/parser/Parser.php(3547): Parser->statelessFetchTemplate(Object(Title), Object(Parser))
#9 /srv/mediawiki/w/includes/parser/Parser.php(3415): Parser->fetchTemplateAndTitle(Object(Title))
#10 /srv/mediawiki/w/includes/parser/Parser.php(3157): Parser->getTemplateDom(Object(Title))
#11 /srv/mediawiki/w/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution(Array, Object(PPFrame_Hash))
#12 /srv/mediawiki/w/includes/parser/Parser.php(2879): PPFrame_Hash->expand(Object(PPNode_Hash_Tree), 0)
#13 /srv/mediawiki/w/includes/parser/Parser.php(1549): Parser->replaceVariables('<!--COMMENT  \xD0\x9F...')
#14 /srv/mediawiki/w/includes/parser/Parser.php(639): Parser->internalParse('<!--COMMENT  \xD0\x9F...')
#15 /srv/mediawiki/w/includes/content/WikitextContent.php(375): Parser->parse('<!--COMMENT  \xD0\x9F...', Object(Title), Object(ParserOptions), true, true, 56)
#16 /srv/mediawiki/w/includes/content/AbstractContent.php(591): WikitextContent->fillParserOutput(Object(Title), 56, Object(ParserOptions), true, Object(ParserOutput))
#17 /srv/mediawiki/w/includes/Revision/RenderedRevision.php(263): AbstractContent->getParserOutput(Object(Title), 56, Object(ParserOptions), true)
#18 /srv/mediawiki/w/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(Object(WikitextContent), true)
#19 /srv/mediawiki/w/includes/Revision/RevisionRenderer.php(217): MediaWiki\Revision\RenderedRevision->getSlotParserOutput('main', Array)
#20 /srv/mediawiki/w/includes/Revision/RevisionRenderer.php(154): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(Object(MediaWiki\Revision\RenderedRevision), Array)
#21 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(Object(MediaWiki\Revision\RenderedRevision), Array)
#22 /srv/mediawiki/w/includes/Revision/RenderedRevision.php(197): call_user_func(Object(Closure), Object(MediaWiki\Revision\RenderedRevision), Array)
#23 /srv/mediawiki/w/includes/Storage/DerivedPageDataUpdater.php(1347): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#24 /srv/mediawiki/w/includes/Storage/DerivedPageDataUpdater.php(1731): MediaWiki\Storage\DerivedPageDataUpdater->getCanonicalParserOutput()
#25 /srv/mediawiki/w/includes/Storage/DerivedPageDataUpdater.php(1490): MediaWiki\Storage\DerivedPageDataUpdater->doParserCacheUpdate()
#26 /srv/mediawiki/w/includes/page/WikiPage.php(2381): MediaWiki\Storage\DerivedPageDataUpdater->doUpdates()
#27 /srv/mediawiki/w/includes/import/ImportableOldRevisionImporter.php(226): WikiPage->doEditUpdates(Object(MediaWiki\Revision\RevisionStoreRecord), Object(User), Array)
#28 /srv/mediawiki/w/includes/import/WikiRevision.php(670): ImportableOldRevisionImporter->import(Object(WikiRevision))
#29 /srv/mediawiki/w/includes/import/WikiImporter.php(429): WikiRevision->importOldRevision()
#30 /srv/mediawiki/w/maintenance/importDump.php(201): WikiImporter->importRevision(Object(WikiRevision))
#31 /srv/mediawiki/w/includes/import/WikiImporter.php(571): BackupReader->handleRevision(Object(WikiRevision), Object(WikiImporter))
#32 /srv/mediawiki/w/includes/import/WikiImporter.php(1059): WikiImporter->revisionCallback(Object(WikiRevision))
#33 /srv/mediawiki/w/includes/import/WikiImporter.php(926): WikiImporter->processRevision(Array, Array)
#34 /srv/mediawiki/w/includes/import/WikiImporter.php(861): WikiImporter->handleRevision(Array)
#35 /srv/mediawiki/w/includes/import/WikiImporter.php(678): WikiImporter->handlePage()
#36 /srv/mediawiki/w/maintenance/importDump.php(353): WikiImporter->doImport()
#37 /srv/mediawiki/w/maintenance/importDump.php(286): BackupReader->importFromHandle(Resource id #942)
#38 /srv/mediawiki/w/maintenance/importDump.php(130): BackupReader->importFromFile('/home/reception...')
#39 /srv/mediawiki/w/maintenance/doMaintenance.php(112): BackupReader->execute()
#40 /srv/mediawiki/w/maintenance/importDump.php(358): require_once('/srv/mediawiki/...')
#41 {main}