Last modified: 2014-03-30 03:31:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64988, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62988 - Special:WhatLinksHere should canonicalize namespace aliases given in URL
Special:WhatLinksHere should canonicalize namespace aliases given in URL
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-23 20:13 UTC by Scott Martin (http://enwp.org/user:scott)
Modified: 2014-03-30 03:31 UTC (History)
3 users (show)

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


Attachments

Description Scott Martin (http://enwp.org/user:scott) 2014-03-23 20:13:17 UTC
The namespace parameter for Special:WhatLinksHere only accepts a numeric index:

https://en.wikipedia.org/w/index.php?title=Special%3AWhatLinksHere&target=Example&namespace=4

It should also accept a namespace alias. At present a non-numeric value is ignored:

https://en.wikipedia.org/w/index.php?title=Special%3AWhatLinksHere&target=Example&namespace=Wikipedia

This would facilitate the development of utility templates.
Comment 1 MZMcBride 2014-03-23 23:25:43 UTC
(In reply to Scott Martin from comment #0)
> This would facilitate the development of utility templates.

Can you provide a specific example? Off-hand I'd think that the namespace ID would be better for use in a template (a programmatic context). The namespace name as a URL parameter requires encoding/quoting if there's anything remotely silly in it; for example, the space in "&namespace=Project talk" would need to be changed to a "_" or "%20" or something, while "&namespace=5" is perfectly fine.

I don't imagine this request is particularly difficult to implement, but I'm still personally unsure the additional code complexity is warranted.
Comment 2 Scott Martin (http://enwp.org/user:scott) 2014-03-24 00:15:43 UTC
Sure; there's already a {{What links here}} on enwp, which is just a wrapper for [[Special:WhatLinksHere/Page name]]. You can't pass a namespace to it.

An upgraded version would instead generate a link to a fully specified URL. As you note, the parameter name would need to be passed through {{urlencode:}} on the template side.

Okay, all that said, I've just been informed that there is a hacky way to get a namespace index from its alias, by giving a fake page name to {{NAMESPACENUMBER}} - {{NAMESPACENUMBER:Namespace you're interested in:X}}. And I'm going to use that technique right now. So I guess this request is moot and I don't mind it being WONTFIXED on that basis - although I think it would be cool to have a non-hacky way to use a namespace alias directly.
Comment 3 Scott Martin (http://enwp.org/user:scott) 2014-03-30 03:12:15 UTC
WONTFIXing as bug 35486 makes this unnecessary - Special:WhatLinksHere is becoming embeddable and will take a namespace parameter.
Comment 4 Bawolff (Brian Wolff) 2014-03-30 03:15:47 UTC
I should note the parameter will still be numeric only.
Comment 5 Scott Martin (http://enwp.org/user:scott) 2014-03-30 03:31:03 UTC
Oh, right. What I meant by that question on the other bug was specifically would it take a text parameter as suggested in the bug filing.

As the workaround I mentioned above exists, I'll reopen this as a lowest priority enhancement without prejudice against a re-WONTFIX from anyone who knows better.

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


Navigation
Links