Template talk:Rfr

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Hmm; I'm not sure what's gone wrong here. I used the template as follows:

{{subst:rfr|Mike Peel|I would like to request the ability to move files. I've encountered several situations over the last few years where this would be a very useful thing to be able to do (the most recent example being [http://commons.wikimedia.org/w/index.php?title=File:Knockin_Radio_Telescope_-_geograph.org.uk_-_1627663.jpg&diff=63384612&oldid=63384576], and I know enough to avoid using the function where it might cause problems - and also to be able to fix things should the worst happen.}} Thank you. ~~~~

... and the result was {{Lorem}} being used rather than the reason I gave. Looking at the code, I can't spot why this happened - any ideas? Thanks. Mike Peel (talk) 01:19, 5 December 2011 (UTC)[reply]

Hi Mike. You need to put |2= on the reason field:
{{subst:rfr|1=Mike Peel|2=I would like to request the ability to move files. I've encountered several situations over the last few years where this would be a very useful thing to be able to do (the most recent example being [1], and I know enough to avoid using the function where it might cause problems - and also to be able to fix things should the worst happen.}} Thank you. --Marco Aurelio (disputatio) 16:28, 5 December 2011 (UTC)[reply]
If you put http-links on the templates but do not use the |2= here, the template will not render properly. Best regards. --Marco Aurelio (disputatio) 16:28, 5 December 2011 (UTC)[reply]
Aah - it's because of the '=' sign in the URL - the parser's treating all of the bit before that as the parameter name. So that's why using 2= in front fixes it (normally, it should be identical to the template just using the second parameter). Adding a reasonable limit to the length of a parameter name would be the logical fix - will suggest that on bugzilla. Thanks. Mike Peel (talk) 16:48, 5 December 2011 (UTC)[reply]