Last modified: 2012-09-16 07:46:24 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 T32868, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30868 - Pagename functions should return an error on invalid pagenames
Pagename functions should return an error on invalid pagenames
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-12 13:43 UTC by The Evil IP address
Modified: 2012-09-16 07:46 UTC (History)
2 users (show)

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


Attachments

Description The Evil IP address 2011-09-12 13:43:47 UTC
It would be nice if the pagename functions like {{PAGENAME:}} or {{FULLPAGENAME:}}, when used with a parameter, would return an error that's parsable for {{#iferror:}}, instead of failing silently, so that we can get an easy way of determining if a page name is valid and stop using ugly hacks (http://en.wiktionary.org/wiki/Template:isValidPageName for example).
Comment 1 db [inactive,noenotif] 2011-09-17 17:17:02 UTC
PAGENAME/FULLPAGENAME and its friends returning an empty string, if the title is invalid. You can use {{#if:{{PAGENAME:{{{1}}}}}|valid|invalid}} to check for a valid pagename and does not need a template construct with {{raw:}}

Support INVALID
Comment 2 Bawolff (Brian Wolff) 2011-09-17 21:02:30 UTC
The raw thing is an interesting hack...

I don't necessarily think this is invalid imho (since you can't detect an error condition using the #iferror parser func, like you arguably should. Also I more consider invalid bugs to be things that are nonsensical as opposed to things we just don't want to do.) However, it is something that I would consider low-ish priority unless it can be demonstrated it is needed (like for example if duplicatebug's solution is insufficient. I would consider needing to use raw: in such a different way than its desired functionality to be a demonstration its needed) .

Before changing this though, one would want to check to see if people are relying on the current behaviour.

However, this is super easy to do...
Comment 3 db [inactive,noenotif] 2012-09-16 07:46:24 UTC
WONTFIX, see comment 1 for alternatives

This will break b/c

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


Navigation
Links