Repository navigation
fix: handle namespaced UnknownContentModelException from newer MediaWiki - #71
Merged
yzqzss merged 5 commits intoNov 25, 2026
Merged
Conversation
Newer MediaWiki reports the error code as internal_api_error_MediaWiki\Content\UnknownContentModelException, so the arvlimit=1 / no-content fallback in getXMLRevisionsByAllRevisions was never triggered and the dump aborted with APIError.
yzqzss
self-requested a review
November 10, 2026 15:17
Member
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On MediaWiki 1.46 (seen on https://wikilivres.ru, which has leftover
Module:pages in theScribuntocontent model while the extension is disabled),--xmlrevisionsaborts with:Newer MediaWiki reports the namespaced class name in the error code, while
getXMLRevisionsByAllRevisionsonly compares againstinternal_api_error_MWUnknownContentModelException, so the existing fallback (retry witharvlimit=1, then withoutarvprop=content) is never triggered.Fix
Add
error_codestoMWUnknownContentModelExceptionwith both the legacy and the namespaced code, and check membership in it.Testing
With this change the wikilivres.ru dump resumes past the affected revisions; they are logged to
errors.logand written as<text deleted="deleted">, as intended by the fallback.🤖 Generated with Claude Code