Page MenuHomePhabricator

generator=links barfs if a link is registered in negative namespaces
Closed, ResolvedPublic

Description

Author: herd

Description:
It is currently possible to register links to negative namespaces.

A link to a non-existing Special: page like [[Special:Foobarbaz]] will show <pl ns="-1" title="Special:Foobarbaz" />, and an image link= like [[Image:Foo|link=Special:UserLogin]] to either an existing or non-existing Special page will show <pl ns="-1" title="Special:UserLogin" />. This last one is rather more buggy than the other. This can also be done with Media: (-2) namespace links in image link=.

These are perhaps not ideal situations, but as there are multiple methods of accidentally doing it, perhaps the API should do a sanity check and ignore -1 namespaces for generator?

See also:
http://test.wikipedia.org/w/api.php?action=query&prop=links&titles=Flibble
http://test.wikipedia.org/w/api.php?action=query&generator=links&titles=Flibble

(test cases are fragile, subject to later repair)


Version: 1.14.x
Severity: major
URL: http://de.wikipedia.org/w/api.php?action=query&generator=links&titles=Wikipedia:WikiProjekt%20Begriffskl%E4rungsseiten/Flie%DFband/Aktuelles

Details

Reference
bz16158

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:23 PM
bzimport set Reference to bz16158.

Bug as filed fixed in r42732. The 'unsupportednamespace' error has become a warning so at least it's not broken any more. This is a temporary solution until we figure out what to do with negative namespace titles; see also bug 16162.