Template talk:Refn

Potential issues
Is this template worth developing just to insulate the user from the cryptic #tag magic word? Does it cause any egregious overhead? Would it be better to teach how to use #tag than push this template? ---— Gadget850 (Ed)  talk 00:07, 6 March 2010 (UTC)


 * I found it useful and straightforward for the listed use case, because I used to replace a set of
 * with
 * The change was a bit less invasive than with #tag:ref and produced a more readable diff. --Joy &#91;shallot&#93; (talk) 10:16, 27 October 2011 (UTC)
 * The change was a bit less invasive than with #tag:ref and produced a more readable diff. --Joy &#91;shallot&#93; (talk) 10:16, 27 October 2011 (UTC)
 * The change was a bit less invasive than with #tag:ref and produced a more readable diff. --Joy &#91;shallot&#93; (talk) 10:16, 27 October 2011 (UTC)
 * The change was a bit less invasive than with #tag:ref and produced a more readable diff. --Joy &#91;shallot&#93; (talk) 10:16, 27 October 2011 (UTC)

Wording of "Purpose" section
Here's the current wording of the Purpose section:

Editors here disagree on the content of this section, and there have been multiple reverts. Please discuss here before making changes. I'm sure we can figure something out in this tiny little corner of Wikipedia. Thanks. – Jonesey95 (talk) 15:49, 6 April 2014 (UTC)
 * Hi.


 * I have highlighted two parts of Jonesey95's message above. These areas say the exact same thing, only the first one, which I reverted, is more technical and is added out of context later.


 * For those who cannot see the highlight, here a reproduction the redundant paragraphs:
 * Paragraph 1: Parser tags such as do not allow the inclusion of wikimarkup such as substing, variables or templates. The magic word   can be used to resolve these issues, but the syntax can be non-obvious. This template uses   with easy to understand parameters.
 * Paragraph 2: Because of a technical limitation, a set of  does not work inside another. But they do work inside this template. This is mainly useful for explanatory footnotes that requires a cite using . (For more information, see .)


 * Best regards,
 * Codename Lisa (talk) 02:31, 7 April 2014 (UTC)


 * I have read both of the paragraphs multiple times, and I do not see either of them as redundant to the other.


 * The first one mentions substing, variables, and templates. The second one does not.


 * The second one talks about nesting ref tags. The first one does not.


 * I see little to no redundancy, and I have been editing references for a while.


 * Usually, in situations like this, what works best is a rewrite, along with some clear examples, to explain what is really going on, rather than trying to work with the existing cobbled-together language. – Jonesey95 (talk) 03:09, 7 April 2014 (UTC)
 * Hi.


 * First, two out of three assertions of the sentence is wrong: In this case, Wikipedia does not support variables outside LUA module at all (maybe you meant parameters?) and templates are okay inside ; in fact, template Cite web is frequently used inside these tags. Hence I reverted these bold allegations. These two seemed so wrong to me that I though if mention them in my revert rationale, it'd be taken as an aggressive act of throwing obvious mistakes in one's face. I was wrong in that account, but here we go.


 * Now, I initially thought "substing" was typo for subsetting, which is a programmers term for nesting. But now, I am thinking maybe it meant to be "substitution". (I had never seen "subst" without colon and with "ing" before.) But again, substitution is already discussed:
 * Paragraph 3: Substitution within references: Substitution, the process of rendering the contents of template into the target article, does not work inside  but does work inside this template.


 * Best regards,
 * Codename Lisa (talk) 14:56, 7 April 2014 (UTC)
 * It sounds like the whole section needs a rewrite. I did not write any of it in the first place, and I do not have the necessary technical knowledge. Would you like to take a stab at a rewrite that is accurate and comprehensible? I think you would do a good job, given your knowledge of the vocabulary involved. – Jonesey95 (talk) 21:11, 7 April 2014 (UTC)
 * I am always willing to change something if I come up with an excellent idea. But the current state is a rewrite: [//en.wikipedia.org/w/index.php?title=Template%3ARefn%2Fdoc&diff=602824153&oldid=602780799]. But I'll see what I can do. Best regards, Codename Lisa (talk) 03:34, 8 April 2014 (UTC)


 * Okay, see how it looks like now. Best regards, Codename Lisa (talk) 04:03, 8 April 2014 (UTC)
 * It looks much clearer to me. Great work. I added a few words to clarify what was happening in the examples, in case it is not obvious to readers what is supposed to happen. – Jonesey95 (talk) 15:54, 8 April 2014 (UTC)

template inside the "|Refs=" field

 * Notes used outside template work correctly:


 * Group1, Note 11:


 * Group1, Note 12:






 * Notes - group 1




 * References




 * but inside "Refs" field don't, for example references are spoiled (don't appear or this message is displayed: "Cite error: A list-defined reference named "name_here" is not used in the content" if the same reference is used in two or more notes) or the note inside Refs behaves like note outside (in the text) and is pointing at itself but such links don't work.


 * Group1, Note 11:


 * Group1, Note 12:


 * Notes - group 1




 * References



This is probably intended or this template is used incorrectly. You can delete later this question. Thank you in advance for possible answer. Darekk2 (talk) 01:10, 14 April 2014 (UTC)
 * I've noticed the same problem. I don't think it is intended, but I'm not able to fix it. --Dennis J au (talk) 16:12, 21 June 2017 (UTC)


 * Just ran into this. Yes, it is a known bug since 2009 (T22707) that WP:list-defined references do not work with nesting. This is currently listed under things that do not work at WP:Nesting footnotes. juanitogan (talk) 22:59, 28 March 2023 (UTC)

Confusing error
In this article section, I wanted to use refn to encapsulate the huge note so I could subsequently convert all the internal links into references. I changed  to   and the ending   to. After making these changes, I get the error "Cite error: There are tags on this page without content in them (see the help page)." The only thing that would make the error message go away was substantially shortening the enclosed note. Is there is a size limit for refn, or is there something else I should look at? Stevie is the man! Talk • Work 19:20, 22 February 2015 (UTC)
 * If the unnamed parameter contains an equals sign (such as one that's part of a URL), you need to escape that by explicitly numbering it, i.e. I strongly suggest that you add titles to those bare URLs. -- Red rose64 (talk) 19:32, 22 February 2015 (UTC)
 * Thanks from the "learning something new every day dept.". :) Fixing all the bare URLs was my intention.  Note that I'm cleaning up someone else's mess.  Stevie is the man!  Talk • Work 19:43, 22 February 2015 (UTC)

Refn references getting sent to the bottom of the page?
I used refn to nest some reference on a page I was working on, and I recently noticed that it has been putting the refn references at the bottom of the page rather than in reflist. I have a stripped down example in my sandbox User:Tarchon/sandbox to demonstrate. It seems to me like it didn't do this until recently, or at least I just noticed it recently. Does anyone know whether this is a bug or something I'm doing wrong? Thx.Tarchon (talk) 18:08, 22 May 2015 (UTC)
 * It's not a fault with, but is because you've got a reference inside a reference. The expands the outermost reference, but can't do anything with the inner one, so it falls out the bottom. AFAIK it's always been like that. Rather than a sandbox, do you have a real-world example? Then, I might be able to suggest an alternative. -- Red rose64 (talk) 18:42, 22 May 2015 (UTC)
 * I could've sworn it was putting the nested references in the reflist when I first put them in last year. I only noticed it because the reference names weren't resolving between the two lists, and I'm pretty sure I would've noticed those big resolution error messages before now. Well, I guess I'll just use something else if that's how it's supposed to work, but it seems like that behavior is really wrong. Aren't nested references one of the main reasons for having this template? Tarchon (talk) 19:05, 22 May 2015 (UTC)
 * They need to be in different groups, see for example LB&SCR A1X Class W8 Freshwater - ref inside note  is constructed using  inside  but the same effect would be produced by  inside  -- Red rose64 (talk) 19:14, 22 May 2015 (UTC)
 * Ah, thanks. I wondered if the lack of group names was the problem, but I wasn't sure what to use. The docs say "Group name per WP:REFGROUP; if not specified, then the main and nested references will be rendered into the same reference list" which is what I was going by. Maybe it's just that the doc page is wrong. Tarchon (talk) 20:56, 22 May 2015 (UTC)
 * I am seeing the same problem in Oxley, Queensland. I understood from the documentation (item 3 in purpose) that refn could be used to nest references and that in the absence of group names the references end up in a single reference list (which is what I want). Certainly it has worked for many months and has suddenly stopped working recently and there's been no change to the use of refn in the article. It looks like something has changed with this template? that's forcing the inner references into a separate group which then throws an unknown reference name exception. Kerry (talk) 08:14, 23 May 2015 (UTC)
 * given that it doesn't look like this template has recently changed, is it possible that the underlying processing of references has changed? Something different is going on that is making this template not work as it claims to and as it used to. Kerry (talk) 08:31, 23 May 2015 (UTC)
 * The template was changed, but it was an error that was reverted 26 minutes later. The current version is . If there has been a change in behaviour, it will be the underlying parser function,  . This may be tested thus:   which gives ... Australia. It is located approximately 10.8 km from the Brisbane CBD.


 * As may be seen, the problem occurs in an example which doesn't use at all. -- Red rose64 (talk) 13:17, 23 May 2015 (UTC)
 * The following nested references have fallen out the bottom of the original reflist from Redrose64's example above. The blank first one is named ref "qpn", the first actual ref, and could probably be glossed over as "Queensland Place Ref 43018" or just "the Oxley ref above".  —  Jeff G. ツ  (talk)   04:44, 26 May 2015 (UTC)


 * The meaning of the refs is immaterial. The intention was to use a real-world, non-sandbox example, viz. that had already been mentioned in this discussion (at 08:14, 23 May 2015) and demonstrate that the same problem occurs without the use of, thus removing that template from the list of suspects. -- Red rose64 (talk) 10:06, 26 May 2015 (UTC)


 * Coming to report the same issue of refn refs being relegated to the bottom of the page at Fez (video game) and Albany Free School. These articles were fine the last time they were touched and the only refs in the articles affected are the ones within refn. Where was this processing change made and whom should we contact? – czar   18:18, 24 May 2015 (UTC)
 * , re: sfn, my issue in Albany Free School is that I want the footnote to appear in reflist alongside the other notes rather than needing a separate notelist with lower-alpha. Up until very recently, this was refn's normal function... The template is designed to support nested sfn or  refs, or we'd otherwise just use efn. One of refn's constituent functions must have changed recently and that change should be reverted. Can you help us trace back the change? –  czar   18:25, 24 May 2015 (UTC)
 * I already did trace it as far as I can, see my post of 13:17, 23 May 2015., which is common to ,  and , is as deep as I can go. The change must be in that or the code which underlies it, none of which is accessible to me. -- Red rose64 (talk) 18:47, 24 May 2015 (UTC)
 * Here is another example using :  which gives ... Australia. It is located approximately 10.8 km from the Brisbane CBD.
 * Notes


 * References


 * As may be seen, the problem does not occur in a similar example (which also doesn't use at all), but instead of actual nesting uses a group so as to not look bad and is used in the current edition of the affected page.   —  Jeff G. ツ  (talk)   05:28, 26 May 2015 (UTC)
 * I think you're misinterpreting the problem. The template is merely a wrapper for   and has not itself changed. It seems that until recently, it was possible to nest  inside   with no group name being specified on either of them, and have them displayed in the same . That behaviour has apparently changed, and it is now necessary to specify a group on one or the other, requiring two . If only one is given, the "inner" refs fall out the bottom of the page, apparently they didn't do that until a few days ago. -- Red rose64 (talk) 09:59, 26 May 2015 (UTC)
 * Yeah, I'd say it's clear now that the bug is in MediaWiki rather than the template. Tarchon (talk) 18:26, 26 May 2015 (UTC)

Reported bug at T100477 – czar   23:59, 26 May 2015 (UTC)
 * Probably related to the resolution of . This patch was applied with MediaWiki 1.26/wmf6 but is not on the change list. --  Gadget850talk 22:38, 27 May 2015 (UTC)
 * , FYI – czar   23:33, 27 May 2015 (UTC)
 * I already know. In fact, I already submitted a patch (currently awaiting review) that will fix it. It's attached to the Phab ticket. Jackmcbarn (talk) 00:53, 28 May 2015 (UTC)


 * There is now a how-to page explaining how nesting can & cannot be achieved with the present software. When the bug is resolved - and there is currently no sign of movement - that page will need to be reviewed. However, I think there is anyway a place for a full helpsheet on the topic Noyster (talk),  18:22, 7 June 2015 (UTC)


 * It seems to be fixed now.Tarchon (talk) 06:18, 7 July 2015 (UTC)


 * Yes and no. You can now have your note and subnote both in the same defined group or in no defined group. However, certain cases using tags that used to render correctly now show a cite error message: you can see examples at this help page, which I need to devote some time to revising Noyster (talk),  10:08, 7 July 2015 (UTC)

Introduction of Cite errors
Hi. I am having a problem with refn appearing to add Cite errors, perhaps due to an underlying bug. Please see User talk:AnomieBOT/Archive 7 for details. Thank you. —  Jeff G. ツ (talk)   02:43, 26 May 2015 (UTC)

Numbering of refs and refns
Hi, Am I correct in thinking that there are Technical Limitations™ to do with the order in which the Refn and its s are parsed? My vaguely tidy mind complains at the first ref in an article not being number [1]. I don't imagine there is a way to get round this sort of thing, not that it matters much. >MinorProphet (talk) 03:31, 19 November 2016 (UTC)


 * Yes, if a subnote (or sub-reference) appears in the same list as the footnote in which it is nested, the subnote will appear above the main note that refers to it. You can get the footnotes in the desired order by using separate "groups" each linked to its own list. Two possible formats are shown here Noyster (talk),  09:10, 19 November 2016 (UTC)
 * It's nothing to do with (or any other template), it's inherent to the cite.php extension - that's the part of the MediaWiki software that recognises <ref ></ref> and, builds the ref list at the bottom, and puts the superscripted links like  into the page text. Nothing that we can do about it here. -- Red rose64 (talk) 09:30, 19 November 2016 (UTC)
 * Thank you both for your prompt and helpful replies confirming what I thought. Just one of those things, then... >MinorProphet (talk) 12:31, 19 November 2016 (UTC)

Documentation page for template refn-display parameters table
Please see this talk page, to display parameters table again, by 2know4power (talk) 00:20, 16 February 2017 (UTC).
 * Fixed, I believe. Someone should check the error report (linked in the TemplateData section) to see if any of them are real errors that need to be fixed. – Jonesey95 (talk) 01:01, 16 February 2017 (UTC)

Parameter 1 (content)
Per TemplateData, Parameter 1 (content) is not required when Template:Refn is used as a named ref, cf. - 74.138.106.1 (talk) 13:37, 28 February 2018 (UTC)
 * Parameter 1 is the content of the note. It is required. Omitting it will produce an error, as shown in the Errors section of the documentation. – Jonesey95 (talk) 15:30, 28 February 2018 (UTC)
 * 1 :
 * 2 :


 * Parameter 1 omitted in item 2 without error. - 74.138.106.1 (talk) 17:14, 28 February 2018 (UTC)
 * Right you are. I stand corrected. You are welcome to edit the Template Data. It is not protected, since it lives in the documentation. – Jonesey95 (talk) 21:21, 28 February 2018 (UTC)

Difficult to understand
I find the instructions really arcane. That is, "difficult to understand." It's like coders talking to coders. Any chance you can get this page looked over by a copy editor who could help in making it sensible? Thanks! BeenAroundAWhile (talk) 19:06, 4 April 2018 (UTC)

Notes in 1987 Major League Baseball draft
Does anyone know why the refn notes in 1987 Major League Baseball draft are not clickable? Therapyisgood (talk) 09:57, 28 April 2020 (UTC)
 * Is the template designed to be unclickable? I am noticing this in several articles that link here. Therapyisgood (talk) 10:04, 28 April 2020 (UTC)
 * If I click on any of the notes it takes me to the list at the bottom. I assume this is not happening for you? I am using Chrome on Windows. Spike &#39;em (talk) 10:20, 28 April 2020 (UTC)

Supported markup?
Is not clear what wiki markup is permitted inside of refn. In particular, are tables supposed to work? Shmuel (Seymour J.) Metz Username:Chatul (talk) 23:46, 13 December 2020 (UTC)
 * Where are you trying to do this? -- Red rose64 &#x1f339; (talk) 21:30, 14 December 2020 (UTC)
 * I'd like to put the table in IBM System/370 in a footnote. Shmuel (Seymour J.) Metz Username:Chatul (talk) 21:57, 14 December 2020 (UTC)
 * Which [//en.wikipedia.org/w/index.php?title=IBM_System/370&action=history version] did you try to do it in? -- Red rose64 &#x1f339; (talk) 22:53, 15 December 2020 (UTC)
 * This footnote
 * displays like this ( commented out because it breaks the rest of the page – Jonesey95 (talk) 18:24, 18 October 2022 (UTC) ) Shmuel (Seymour J.) Metz Username:Chatul (talk) 00:21, 16 December 2020 (UTC)
 * The table markup is being parsed as pipes within the refn template. You can hack your way around it if you insist, but it's ugly (and I don't know of a way to include references inside this reference). It looks like this (view the code to see the ugliness):
 * I can't recommend it, but it appears to work. Consider putting the information into the article instead. – Jonesey95 (talk) 00:35, 16 December 2020 (UTC)
 * Thanks. I see what's happening, and I agree that the hack is ugly. I guess that I'll just leave the table inline. Shmuel (Seymour J.) Metz Username:Chatul (talk) 03:22, 16 December 2020 (UTC)
 * Now that I've seen it demonstrated, I realise that I answered virtually the same question elsewhere (possibly VPT) several months ago. In short: in the table start marker, the pipe is being treated as a parameter separator and so the   is being taken as a literal character. -- Red rose64 &#x1f339; (talk) 21:51, 17 December 2020 (UTC)
 * Now that I've seen it demonstrated, I realise that I answered virtually the same question elsewhere (possibly VPT) several months ago. In short: in the table start marker, the pipe is being treated as a parameter separator and so the   is being taken as a literal character. -- Red rose64 &#x1f339; (talk) 21:51, 17 December 2020 (UTC)

Template-protected edit request on 11 July 2022
Change the code of this template to add  parameter, like mw:Help:Cite. I have tested it in Template:Refn/testcases. Thingofme (talk) 14:12, 11 July 2022 (UTC)
 * ✅. Editor, please update this template's documentation as needed. Thank you!  P.I. Ellsworth &thinsp;, ed.  put'r there 20:39, 19 July 2022 (UTC)

Reusing named references in notelist
In 2022 ICC Men's T20 World Cup squads (see this version), I've tried creating a set of footnotes using efn and notelist. The notes are defined in the notelist, and I'd like to use the same final reference for both entries (using a tag, but if I add the  to the second entry I get an error: Cite error: A list-defined reference with the name "ban2" has been invoked, but is not defined in the references tag (see the help page).. I copied to a sandbox, but don't get the same error there. Is there a way to do this (I've tried using a refn as the inner reference, but still gives an error)? Even with the error being shown, the refs display correctly.

The working is effectively:


 * Soumya Sarkar
 * Shoriful Islam
 * Mohammad Saifuddin
 * Sabbir Rahman

Thanks Spike &#39;em (talk) 17:31, 18 October 2022 (UTC)
 * This keeps coming up on various talk pages, e.g. Template talk:Efn. In short: don't attempt to combine with WP:LDR. It never has worked properly, and there are several discussions on the matter. -- Red rose64 &#x1f339; (talk) 06:21, 22 October 2022 (UTC)
 * Ok, thanks. If I preview the page with the notes defined in-line it seems to display properly and without any warnings. I seem to be involved in a slow-moving edit war over the use of efn / notelist rather than manually created superscripts / notes so will try for real later. Spike &#39;em (talk) 13:24, 27 October 2022 (UTC)

Embedding math tags into a reference notes
I tried using this template today on page Electric dipole moment. That page has footnotes that contain both complex equations using $$$$ and also citations embedded in footnotes. When i did this I got a number of weird errors. Any thoughts on what i can do here? Mblumber (talk) 20:57, 20 December 2022 (UTC)
 * What weird errors would those be? -- Red rose64 &#x1f339; (talk) 22:15, 20 December 2022 (UTC)
 * I put the code here, let me know what you think. Mblumber (talk) 01:05, 21 December 2022 (UTC)
 * The problem is nothing to do with the, it's that in the non-math part you have an unescaped  in the unnamed parameter, so it gets interpreted as a parameter with a strangely long and complex name instead. You could escape it with = or name the parameter as 1 or refn. Anomie⚔ 12:23, 21 December 2022 (UTC)
 * Yep, those solutions all fix it. thanks. Mblumber (talk) 23:14, 22 December 2022 (UTC)