Last modified: 2010-05-15 15:41:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 6965 - Cannot include template:R with "{{R}}"
Cannot include template:R with "{{R}}"
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
1.7.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
: 7822 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-10 04:31 UTC by Fyren
Modified: 2010-05-15 15:41 UTC (History)
3 users (show)

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


Attachments
Tentative patch (2.56 KB, patch)
2007-06-08 00:28 UTC, Rob Church
Details

Description Fyren 2006-08-10 04:31:49 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.
Comment 1 Brion Vibber 2006-08-12 06:03:59 UTC
Please include a URL to a specific page showing the problem
Comment 2 Fyren 2006-08-12 21:48:47 UTC
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

Comment 3 Fyren 2006-10-07 02:19:30 UTC
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.
Comment 4 Jimmy Collins 2006-10-07 10:29:01 UTC
When R is an magic word and cannot be used as template name, this bug should be
closed as invalid.
Comment 5 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-10-08 23:30:07 UTC
Surely something not likely to be duplicated by end-users could be used instead.
Comment 6 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-11-06 14:50:21 UTC
*** Bug 7822 has been marked as a duplicate of this bug. ***
Comment 7 Rob Church 2007-06-08 00:28:51 UTC
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.
Comment 8 Brion Vibber 2007-07-09 14:59:32 UTC
Hmmm, sounds reasonable I guess? Unless they're supposed to be more broken up by location.
Comment 9 Jelte (WebBoy) 2007-07-09 15:22:22 UTC
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.
Comment 10 Rob Church 2007-07-10 14:57:11 UTC
Fixed in r23964.

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


Navigation
Links