Example urls:
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Don't fail hard on bad titles in the database. | mediawiki/core | master | +252 -28 |
Related Objects
- Mentioned In
- T326431: Some system users have invalid 'actor' database rows
T307738: Actor name can not be empty for 0 and 3215898
T222628: Some history views and diffs unavailable on Wikipedias (Fatal ParameterAssertionException: Bad value for parameter $dbkey) - Mentioned Here
- T2323: Edits from various users active before 2003 are missing from Special:Contributions
T137147: Unable to view action=info for certain pages (InfoAction throws ParameterAssertionException: invalid DB key)
Event Timeline
The number of page this affects is presumably limited. But the impact is quite severe given it makes it impossible to "View history" or view "Page information" for these pages.
However, given the page can still be viewed and edited, it also affects community's ability to counter vandalism.
This seems like more or less a duplicate or effect of T2323: usernames in really old revisions (copied from pre-MediaWiki versions of Wikipedia) cause various problems.
Might be. Although note that T2323 does not cause an exception. It is able to show the revision in diff view without issue, and on Special:Contributions it simply shows no results (or only results for the closest valid form of the username, e.g. in case of simple underscores within a name)
I recently noticed this problem at:
https://en.wikipedia.org/w/index.php?title=AD_42&limit=1&dir=prev&action=history
In that case, per the January 2003 database dump, the username is "branteaton" (note the lowercase "b").
It doesn't affect usernames like "Larry_sanger" though ... if it did, this revision history (among many others) would cause problems:
https://en.wikipedia.org/w/index.php?title=Prince_Harry,_Duke_of_Sussex&dir=prev&action=history
Even browsing to such a page (e.g. https://test.wikipedia.org/wiki/User:Test_/test1) results in a mediawiki error, dump below:
MediaWiki internal error.
Original exception: [XP8PjwpAICkAAEDrqXEAAAAO] /wiki/User:Test_/test1 Wikimedia\Assert\ParameterAssertionException from line 63 of /srv/mediawiki/php-1.34.0-wmf.8/vendor/wikimedia/assert/src/Assert.php: Bad value for parameter $dbkey: invalid DB key 'Test_'
Backtrace:
#0 /srv/mediawiki/php-1.34.0-wmf.8/includes/title/TitleValue.php(105): Wikimedia\Assert\Assert::parameter(boolean, string, string)
#1 /srv/mediawiki/php-1.34.0-wmf.8/includes/title/NamespaceInfo.php(162): TitleValue->__construct(integer, string)
#2 /srv/mediawiki/php-1.34.0-wmf.8/includes/Title.php(1523): NamespaceInfo->getTalkPage(Title)
#3 /srv/mediawiki/php-1.34.0-wmf.8/extensions/WikiLove/includes/WikiLoveHooks.php(166): Title->getTalkPage()
#4 /srv/mediawiki/php-1.34.0-wmf.8/extensions/WikiLove/includes/WikiLoveHooks.php(57): WikiLoveHooks::getUserTalkPage(Title, User)
#5 /srv/mediawiki/php-1.34.0-wmf.8/includes/Hooks.php(174): WikiLoveHooks::onBeforePageDisplay(OutputPage, SkinMonoBook)
#6 /srv/mediawiki/php-1.34.0-wmf.8/includes/Hooks.php(234): Hooks::callHook(string, array, array, NULL, string)
#7 /srv/mediawiki/php-1.34.0-wmf.8/includes/OutputPage.php(2746): Hooks::runWithoutAbort(string, array)
#8 /srv/mediawiki/php-1.34.0-wmf.8/includes/MediaWiki.php(872): OutputPage->output(boolean)
#9 /srv/mediawiki/php-1.34.0-wmf.8/includes/MediaWiki.php(884): MediaWiki->{closure}()
#10 /srv/mediawiki/php-1.34.0-wmf.8/includes/MediaWiki.php(515): MediaWiki->main()
#11 /srv/mediawiki/php-1.34.0-wmf.8/index.php(42): MediaWiki->run()
#12 /srv/mediawiki/w/index.php(3): require(string)
#13 {main}
Exception caught inside exception handler: [XP8PjwpAICkAAEDrqXEAAAAO] /wiki/User:Test_/test1 Wikimedia\Assert\ParameterAssertionException from line 63 of /srv/mediawiki/php-1.34.0-wmf.8/vendor/wikimedia/assert/src/Assert.php: Bad value for parameter $dbkey: invalid DB key 'Test_'
Backtrace:
#0 /srv/mediawiki/php-1.34.0-wmf.8/includes/title/TitleValue.php(105): Wikimedia\Assert\Assert::parameter(boolean, string, string)
#1 /srv/mediawiki/php-1.34.0-wmf.8/includes/title/NamespaceInfo.php(162): TitleValue->__construct(integer, string)
#2 /srv/mediawiki/php-1.34.0-wmf.8/includes/Title.php(1523): NamespaceInfo->getTalkPage(Title)
#3 /srv/mediawiki/php-1.34.0-wmf.8/extensions/WikiLove/includes/WikiLoveHooks.php(166): Title->getTalkPage()
#4 /srv/mediawiki/php-1.34.0-wmf.8/extensions/WikiLove/includes/WikiLoveHooks.php(57): WikiLoveHooks::getUserTalkPage(Title, User)
#5 /srv/mediawiki/php-1.34.0-wmf.8/includes/Hooks.php(174): WikiLoveHooks::onBeforePageDisplay(OutputPage, SkinMonoBook)
#6 /srv/mediawiki/php-1.34.0-wmf.8/includes/Hooks.php(234): Hooks::callHook(string, array, array, NULL, string)
#7 /srv/mediawiki/php-1.34.0-wmf.8/includes/OutputPage.php(2746): Hooks::runWithoutAbort(string, array)
#8 /srv/mediawiki/php-1.34.0-wmf.8/includes/exception/MWExceptionRenderer.php(134): OutputPage->output()
#9 /srv/mediawiki/php-1.34.0-wmf.8/includes/exception/MWExceptionRenderer.php(53): MWExceptionRenderer::reportHTML(Wikimedia\Assert\ParameterAssertionException)
#10 /srv/mediawiki/php-1.34.0-wmf.8/includes/exception/MWExceptionHandler.php(121): MWExceptionRenderer::output(Wikimedia\Assert\ParameterAssertionException, integer)
#11 /srv/mediawiki/php-1.34.0-wmf.8/includes/exception/MWExceptionHandler.php(195): MWExceptionHandler::report(Wikimedia\Assert\ParameterAssertionException)
#12 /srv/mediawiki/php-1.34.0-wmf.8/includes/MediaWiki.php(542): MWExceptionHandler::handleException(Wikimedia\Assert\ParameterAssertionException)
#13 /srv/mediawiki/php-1.34.0-wmf.8/index.php(42): MediaWiki->run()
#14 /srv/mediawiki/w/index.php(3): require(string)
#15 {main}
That's a slightly different issue, having to do with recently added validation in Title rather than this task which has to do with usernames stored in the database. The specific example affects user pages only because it's WikiLove trying to find the user talk page for a user subpage.
Note Platform Engineering (Needs Cleaning - Security, stability, performance, and scalability (TEC1)) is a column on Platform Engineering. If you intended to put this back in our inbox, an explanation would be helpful.
- View article https://en.wikipedia.org/wiki/Audi
- Press "Page information"
This does not appear to be an edge case or where something is somewhat odd with the article itself that a user could repair. Rather there is something somewhere else on the wiki causing it (in this case, I think it's the name of the actor that created the page some years ago).
Whether we can display that actor's name is another matter, but I think it should be high priority that we don't completely fail for such basic and discoverable feature, especially since there's a lot of other information on that page that would still be useful. And because it's a fatal error, exposed to logged-out users, over a UI-discoverable url, on any GET request to it. And with no discoverable workaround for end-users. The fatal nature also makes it a bit of a prod risk, I think.
Change 540395 had a related patch set uploaded (by Daniel Kinzler; owner: Daniel Kinzler):
[mediawiki/core@master] WIP Don't fail hard on bad titles in the database.
Change 540395 merged by jenkins-bot:
[mediawiki/core@master] Don't fail hard on bad titles in the database.