MediaWiki talk:Titleblacklist-custom-repeated-namespace-prefix

This is an old revision of this page, as edited by Andy M. Wang (talk | contribs) at 07:20, 13 October 2016 (Protected edit request on 13 October 2016: more clearly about prefix). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Latest comment: 8 years ago by Andy M. Wang in topic Protected edit request on 13 October 2016

Protected edit request on 13 October 2016

Found an existing bug (since 2012) involving its appearance on Special pages. The scenario today (previously confined to "Category:Category:"):

If a user (unable to override the blacklist) attempts to move a page unintentionally to a title with a prefix like "Wikipedia:Wikipedia:" (example), this custom message now pops up. Unfortunately, {{PAGENAME}} and {{FULLPAGENAME}} would return a redlinked "MovePage" and "Special:MovePage", which is a very misleading error message in the form. Like the recent fix to MediaWiki:Protectedinterface, a check of the namespace number will fix the problem.

The following code would solve that issue. Please replace the page with the following:

{{fmbox 
| type  = editnotice
| image = [[File:Ambox warning yellow.svg|40px|link=]]
| text  = '''You appear to be trying to {{#ifexpr:{{NAMESPACENUMBER}} < 0
  |create a page with (or move a page to) a title with a double-namespace prefix. This is likely a title naming error.
  |{{#ifexist:{{PAGENAME}}|view|create}} [[:{{PAGENAME}}]] but are actually about to create [[:{{FULLPAGENAME}}]]'''
* If you are trying to {{#ifexist:{{PAGENAME}}|view|create}} '''[[:{{PAGENAME}}]]''', just follow the {{#ifexist:{{PAGENAME}}||red}} link.}}
* If this is the page you want to create, please make a request at [[Wikipedia:Administrators' noticeboard]].
}}

(Tested output appearance in preview, looks good.) Thanks, — Andy W. (talk) 06:44, 13 October 2016 (UTC)Reply