Last modified: 2009-01-01 00:23:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 16162 - Negative namespace titles handled inconsistently
Negative namespace titles handled inconsistently
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.14.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-28 14:55 UTC by Roan Kattouw
Modified: 2009-01-01 00:23 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Roan Kattouw 2008-10-28 14:55:20 UTC
Until recently, (*_namespace, *_title) pairs in the database never had a negative value for *_namespace. Somehow, that convention changed recently: the pagelinks table now contains links to Special: (-1) and Media: (-2) pages as well, causing code making assumptions about the nonexistence of negative namespaces to fail (e.g. bug 16158).

On top of this, behavior for registering links to special pages is inconsistent. According to a quick test Splarka ran early this morning, links through [[Image:Foo.jpg|link=Special:Bar]] are always registered, while regular links like [[Special:Foo]] are only registered if the special page doesn't exist; links to existing special pages like [[Special:Allpages]] are *not* registered. AFAIK, tests concerning links to the Media: namespace or transclusion (stuff like {{Special:PrefixIndex/API}}) haven't been done yet (if you feel like it, go right ahead).

We should decide to register all links and related stuff to Special: and Media: pages, or to register none of them. The current behavior is confusing and inconsistent.

CCing to Tim as Splarka tells me he knows more about it.
Comment 1 Tim Starling 2008-10-28 15:13:51 UTC
My opinion is that they should be registered. The fact that they aren't registered is an accident of history. One can think of useful applications for registration of both special pages and media links. 
Comment 2 Brion Vibber 2009-01-01 00:23:13 UTC
This was a side effect of enforcement of looks being distributed in various different places.

Changes to Title::isAlwaysKnown() caused the behavior to become inconsistent for inline links (with existing special pages not getting recorded, while nonexistent ones ended up going through the main code path and now getting recorded), while the image link target one simply went through a new, very different code path and got recorded.

I've now moved the special checks explicitly into ParserOutput::addLink() in r45266 for bug 16806, so behavior should be nice and consistent.

For now the special links are not being recorded. It could be useful to start recording them, but we'd want to do a few things:
* Normalize the link names to canonical form
* Consider a way to deal with parameters
* Add UI for all the various "show me stuff from the link tables" to consistently allow doing something with that data

This belongs in a new bug if it's desirable.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links