Page MenuHomePhabricator

Special:EditWatchlist is broken
Closed, ResolvedPublic

Description

Special:EditWatchlist is broken returning: Exception encountered, of type "InvalidArgumentException"

See:
https://he.wikipedia.org/wiki/Special:EditWatchlist

Raw HTML content of the error: P3184

Event Timeline

eranroz triaged this task as Unbreak Now! priority.May 26 2016, 7:09 PM

Works for me. Maybe it depends on your watchlist's contents.

Dereckson lowered the priority of this task from Unbreak Now! to High.EditedMay 26 2016, 7:12 PM
Dereckson subscribed.

@eranroz Would you have an exception identifier?

Around 5 different editors in hewiki report there is such issue.
I can reproduce it as well, but can't give more information since it is server side exception

There isn't an alphanumerical identifier of the exception?

On fr.wikipedia, where I've my biggest list, it's very slow to get it (25 seconds).

There isn't an alphanumerical identifier of the exception?

No. This is the whole returned content [except http headers]

You and the five users are established users with huge (thousand of entries) watchlists or is one of them has a very small watchlist?

matmarex subscribed.

Searching for recent stuff from hewiki with InvalidArgumentException in it in logstash…

hewiki [V0dLSApAICsAAHdb2H8AAAAD] Unknown namespace ID: 2601

Namespace 2600 is Flow's 'Topic', 2601 would be its talk, which does not exist, so this seems bad.

There are similar errors from other wikis with other namespace ids, but they have backtraces related to Special:Search rather than EditWatchlist.

I have ~500 pages (including flow sections - could it be related?)

I am one from the 5. and i have 1,091 page on my watchlist.

eranroz raised the priority of this task from High to Unbreak Now!.May 26 2016, 8:11 PM

Is there a stack trace in the log to point out where exactly it fails? can we git blame it? [I couldn't find something relevant in the recent changes in Flow [git log -p], but it is quiet active project so I'm sure I missed :) ]

Since it break core functionality I'm changing the priority to "Unbreak Now!". We should consider rollback of the revision in the production (and stop the deployment for wikis using Flow).
PS it isn't just in hewiki but also in mediawiki wiki

{"file":"/srv/mediawiki/php-1.28.0-wmf.3/includes/title/MediaWikiTitleCodec.php","line":108,"function":"getNamespaceName","class":"MediaWikiTitleCodec","type":"->","args":["integer","string"]},
{"file":"/srv/mediawiki/php-1.28.0-wmf.3/includes/title/MediaWikiTitleCodec.php","line":181,"function":"formatTitle","class":"MediaWikiTitleCodec","type":"->","args":["integer","string","string","string"]},
{"file":"/srv/mediawiki/php-1.28.0-wmf.3/includes/linker/LinkRenderer.php","line":330,"function":"getPrefixedText","class":"MediaWikiTitleCodec","type":"->","args":["Title"]},
{"file":"/srv/mediawiki/php-1.28.0-wmf.3/includes/linker/LinkRenderer.php","line":163,"function":"makeBrokenLink","class":"MediaWiki\\Linker\\LinkRenderer","type":"->","args":["Title","HtmlArmor","array","array"]},
{"file":"/srv/mediawiki/php-1.28.0-wmf.3/includes/Linker.php","line":239,"function":"makeLink","class":"MediaWiki\\Linker\\LinkRenderer","type":"->","args":["Title","HtmlArmor","array","array"]},
{"file":"/srv/mediawiki/php-1.28.0-wmf.3/includes/specials/SpecialEditWatchlist.php","line":618,"function":"link","class":"Linker","type":"::","args":["Title","string"]},
{"file":"/srv/mediawiki/php-1.28.0-wmf.3/includes/specials/SpecialEditWatchlist.php","line":554,"function":"buildRemoveLine","class":"SpecialEditWatchlist","type":"->","args":["Title"]},
{"file":"/srv/mediawiki/php-1.28.0-wmf.3/includes/specials/SpecialEditWatchlist.php","line":151,"function":"getNormalForm","class":"SpecialEditWatchlist","type":"->","args":[]},
{"file":"/srv/mediawiki/php-1.28.0-wmf.3/includes/specials/SpecialEditWatchlist.php","line":130,"function":"executeViewEditWatchlist","class":"SpecialEditWatchlist","type":"->","args":[]},
{"file":"/srv/mediawiki/php-1.28.0-wmf.3/includes/specialpage/SpecialPage.php","line":479,"function":"execute","class":"SpecialEditWatchlist","type":"->","args":["boolean"]},
{"file":"/srv/mediawiki/php-1.28.0-wmf.3/includes/specialpage/SpecialPageFactory.php","line":591,"function":"run","class":"SpecialPage","type":"->","args":["NULL"]},
{"file":"/srv/mediawiki/php-1.28.0-wmf.3/includes/MediaWiki.php","line":282,"function":"executePath","class":"SpecialPageFactory","type":"::","args":["Title","RequestContext"]},
{"file":"/srv/mediawiki/php-1.28.0-wmf.3/includes/MediaWiki.php","line":746,"function":"performRequest","class":"MediaWiki","type":"->","args":[]},
{"file":"/srv/mediawiki/php-1.28.0-wmf.3/includes/MediaWiki.php","line":520,"function":"main","class":"MediaWiki","type":"->","args":[]},
{"file":"/srv/mediawiki/php-1.28.0-wmf.3/index.php","line":43,"function":"run","class":"MediaWiki","type":"->","args":[]},
{"file":"/srv/mediawiki/w/index.php","line":3,"function":"include","args":["string"]}
Legoktm subscribed.

The old Linker used Title::getPrefixedText() which was more lenient about non-existent namespaces, LinkRenderer/TitleFormatter aren't. I'll fix TitleFormatter to be more lenient for now.

Change 291040 had a related patch set uploaded (by Legoktm):
TitleParser: In formatTitle(), don't throw exceptions on bad namespaces

https://gerrit.wikimedia.org/r/291040

Change 291099 had a related patch set uploaded (by Legoktm):
TitleParser: In formatTitle(), don't throw exceptions on bad namespaces

https://gerrit.wikimedia.org/r/291099

Change 291040 merged by jenkins-bot:
TitleParser: In formatTitle(), don't throw exceptions on bad namespaces

https://gerrit.wikimedia.org/r/291040

Change 291099 merged by Legoktm:
TitleParser: In formatTitle(), don't throw exceptions on bad namespaces

https://gerrit.wikimedia.org/r/291099

Mentioned in SAL [2016-05-26T21:43:48Z] <legoktm@tin> Synchronized php-1.28.0-wmf.3/includes/title/MediaWikiTitleCodec.php: TitleParser: In formatTitle(), don't throw exceptions on bad namespaces - T136352, T136356 (duration: 00m 28s)

@eranroz: can you try now? Should be fixed.

@Legoktm, thanks for the quick hotfix. Seems to work now