Last modified: 2010-05-15 15:41:09 UTC
On a wiki I contribute to running 1.7.1 as well as on English Wikipedia (as of this report), including template:R with {{R}} doesn't work as expected and includes nothing. {{r}} works as expected by including template:R. Using {{subst:R}} similarly substitutes nothing while {{subst:r}} substitutes in the template. I think this might have been caused by the change to the "raw" syntax for variables (e.g. {{NUMBEROFPAGES:R}}, see http://mail.wikipedia.org/pipermail/wikitech-l/2006-July/036836.html), but I'm unsure.
Please include a URL to a specific page showing the problem
Template:R isn't used anywhere on English Wikipedia, so I made an example in the sandbox: http://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&oldid=69278571
This happens because the new way of getting the raw values of some magic words added "R" as a magic word itself (with ID "rawsuffix"). So when the parser is doing variable substitution, it sees {{R}} as a magic word rather than a template and then replaces it with the result of getVariableValue('rawsuffix'), which is always null.
When R is an magic word and cannot be used as template name, this bug should be closed as invalid.
Surely something not likely to be duplicated by end-users could be used instead.
*** Bug 7822 has been marked as a duplicate of this bug. ***
Created attachment 3737 [details] Tentative patch Patch introduces the concept of magic words which are "modifiers", and alters the parser to ignore such when dealing with magic words in Parser::replaceVariables(), then adds "rawsuffix" to the default list. Seems to work in testing and doesn't seem to cause problems, but I'd like this one reviewed.
Hmmm, sounds reasonable I guess? Unless they're supposed to be more broken up by location.
Why is 'rawsuffix' in MagicWord::$mVariableIDs? Index: includes/MagicWord.php =================================================================== --- includes/MagicWord.php (revision 23739) +++ includes/MagicWord.php (working copy) @@ -86,7 +86,6 @@ 'subjectpagename', 'subjectpagenamee', 'numberofusers', - 'rawsuffix', 'newsectionlink', 'numberofpages', 'currentversion', fixes this bug.
Fixed in r23964.