Page MenuHomePhabricator

Mediawiki info action throws Bad value for parameter $title: invalid name 'Brad_'
Open, LowPublic

Description

Error message
[XXd1MQpAICoAAC-ctdEAAAAN] /w/index.php?title=Audi&action=info   Wikimedia\Assert\ParameterAssertionException from line 63 of /srv/mediawiki/php-1.34.0-wmf.21/vendor/wikimedia/assert/src/Assert.php: Bad value for parameter $title: invalid name 'Brad_'
Impact

?action=info dumps an internal error.

https://en.wikipedia.org/w/index.php?title=Audi&action=info

Notes

Details

Request ID
XXd1MQpAICoAAC-ctdEAAAAN
Request URL
https://en.wikipedia.org/w/index.php?title=Audi&action=info
Stack Trace
#0 /srv/mediawiki/php-1.34.0-wmf.21/includes/title/TitleValue.php(104): Wikimedia\Assert\Assert::parameter(boolean, string, string)
#1 /srv/mediawiki/php-1.34.0-wmf.21/includes/title/NamespaceInfo.php(205): TitleValue->__construct(integer, string)
#2 /srv/mediawiki/php-1.34.0-wmf.21/includes/Title.php(1552): NamespaceInfo->getTalkPage(Title)
#3 /srv/mediawiki/php-1.34.0-wmf.21/includes/actions/InfoAction.php(551): Title->getTalkPage()
#4 /srv/mediawiki/php-1.34.0-wmf.21/includes/actions/InfoAction.php(124): InfoAction->pageInfo()
#5 /srv/mediawiki/php-1.34.0-wmf.21/includes/actions/FormlessAction.php(43): InfoAction->onView()
#6 /srv/mediawiki/php-1.34.0-wmf.21/includes/MediaWiki.php(507): FormlessAction->show()
#7 /srv/mediawiki/php-1.34.0-wmf.21/includes/MediaWiki.php(302): MediaWiki->performAction(Article, Title)
#8 /srv/mediawiki/php-1.34.0-wmf.21/includes/MediaWiki.php(892): MediaWiki->performRequest()
#9 /srv/mediawiki/php-1.34.0-wmf.21/includes/MediaWiki.php(523): MediaWiki->main()
#10 /srv/mediawiki/php-1.34.0-wmf.21/index.php(42): MediaWiki->run()
#11 /srv/mediawiki/w/index.php(3): include(string)
#12 {main}

Event Timeline

hashar created this task.Tue, Sep 10, 10:19 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptTue, Sep 10, 10:19 AM
hashar updated the task description. (Show Details)Tue, Sep 10, 10:19 AM

I dug a bit, and it seems action=info does not perform the usual normalisations and follow redirects that usually happen in MW (perhaps because this exception happens too early?). In this instance, there is one rewrite and one redirect: User:Brad_ -> User:Brad -> User:Bradley0110 (the first is a rewrite, i.e. the trailing _ is simply dropped, while the latter is a MW-level redirect).

The same problem occurs on: https://en.wikipedia.org/w/index.php?title=Audi&dir=prev&action=history

It seems that the first revision of that page is recorded to have been created by a user with the name "Brad_", which is invalid these days due to the trailing underscore:

https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=revisions&titles=Audi&rvprop=ids%7Ctimestamp%7Cflags%7Ccomment%7Cuser%7Cuserid&rvlimit=1&rvdir=newer

{
    "continue": {
        "rvcontinue": "20020225154311|52561",
        "continue": "||"
    },
    "query": {
        "pages": {
            "848": {
                "pageid": 848,
                "ns": 0,
                "title": "Audi",
                "revisions": [
                    {
                        "revid": 234233,
                        "parentid": 0,
                        "minor": "",
                        "user": "Brad_",
                        "userid": 2594078,
                        "timestamp": "2001-09-26T12:34:19Z",
                        "comment": "Added English translation of Vorsprung durch Technik"
                    }
                ]
            }
        }
    }
}

But querying for an user with that ID, we get a "Brad":

https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&list=users&ususerids=2594078

{
    "batchcomplete": "",
    "query": {
        "users": [
            {
                "userid": 2594078,
                "name": "Brad"
            }
        ]
    }
}

Is this an incomplete rename (from 2008-ish…) or something else?

eprodromou triaged this task as Low priority.Wed, Sep 11, 5:59 PM