Page MenuHomePhabricator

Link from recent revisions goes to "no such special page"
Closed, DuplicatePublic

Description

From [[WP:VPT#No_such_special_page]]:

Clicking on a Recent changes entry with the URL http://en.wikipedia.org/w/index.php?title=Sameera_Mallawarachchi&curid=33321830&action=history caused an unexpected response. The link is to an article I had just deleted. Strangely, the link shows a Wikipedia page with a title of Error, an article-like title of No such special page and content of You have requested a special page that is not recognized by Wikipedia. A list of all recognized special pages may be found at Special:Specialpages. If the &curid field is removed, it responds more sensibly showing deletion information.


Version: 1.18.x
Severity: normal

Details

Reference
bz31431

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:50 PM
bzimport set Reference to bz31431.
bzimport added a subscriber: Unknown Object (MLST).

The fact that it's a special page error is a separate bug (we need to implement a real Badtitle special page).

The bug appears to be due to our title handling:

http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/Wiki.php?view=markup#l62

Instead of calling Title::newFromURL the code that handles the &curid= activates when you have a &curid= however because the title was deleted and the page_id no longer exists Title::newFromID returns null and Badtitle is returned.

I think we should change that set of code to work on the "if it's not set model". ie: Instead of elseif, each of those blocks is a if ( is_null( $ret ) && [...] ) then if any case is active but the Title:: for that case returns null the next case will activate.

In the case of a &curid=###&title= if &curid= exists it will override but if it doesn't &title= will return a title.

Another example (namespace with empty page part) - http://en.wikipedia.org/wiki/User:

(In reply to comment #5)

Another example (namespace with empty page part) -
http://en.wikipedia.org/wiki/User:

That's a little more to do with us not having a proper Badtitle page, than with the other oldid bug.