Archive 30Archive 32Archive 33Archive 34

Column width deprecated?

I saw an editor removing 30em from one instance of the template, saying this parameter was deprecated and that it should be removed for accessibility reasons. I knew that setting the exact number of columns (|2, etc.) has long been deprecated, but it's news to me that the same has also happened to the parameter for the column width. Is this really so? The template's documentation still gives examples of the use of this parameter, and from a very quick skim of the archives I'm not seeing anything to suggest such deprecation. The impression I get from those discussions is that 30em is currently the default, so removing it apparently won't make a visual difference, and that even then editors should not just remove it as it reflects editorial judgement about the average size of the footnotes on each individual article (something that the template doesn't itself have access to). – Uanfala (talk) 16:52, 16 May 2021 (UTC)

That claim, if it was made in the way you attest (no links were provided), is untrue. The documentation is up to date. – Jonesey95 (talk) 16:55, 16 May 2021 (UTC)
I would advise to remove it, but only because I am of the opinion that we should send the minimal CSS to the browser, and adding a custom "30em" adds the associated inline styles, rather than relying on the already-loaded styles in the variety of sheets available. The lack of an explicit width set in the template is just as telling about an editor's choice IME.
You are otherwise correct in your understanding that the integer version for column count is deprecated, and in fact is implemented as column-widths under the hood. Izno (talk) 18:14, 16 May 2021 (UTC)
The 30em default doesn't seem to be working at the moment. Can this either be restored, or the documentation updated? (Hohum @) 14:02, 7 August 2021 (UTC)
The column width is usually not needed for {{reflist}}, but it is needed to make columns in {{refbegin}}/{{refend}}, and when it is used for those it should also be used in {{reflist}} to make sure that the columns are the same width for all. —David Eppstein (talk) 16:32, 7 August 2021 (UTC)
Hohum, please link to an example page where the default column width is not working. – Jonesey95 (talk) 20:26, 7 August 2021 (UTC)
My mistake, the article only had ten references, so the default width wasn't applied. (Hohum @) 10:45, 8 August 2021 (UTC)

How to create this type of Reference

How to create this type of Reference [1] Jayanta (CIS-A2K) (talk) 17:37, 24 August 2021 (UTC)

{{Wikisourcelang-inline|gu|પૃષ્ઠ:Akhegita.pdf/૧૫|તડફડે}}
gives   Gujarati Wikisource has original text related to this article: તડફડે
or some text to be referenced.<ref>[[s:gu:પૃષ્ઠ:Akhegita.pdf/૧૫|તડફડે]], Wikisource</ref> gives

some text to be referenced.[1]

References

  1. ^ તડફડે, Wikisource

-- Michael Bednarek (talk) 02:37, 25 August 2021 (UTC)

Reference Tooltips

I was curious: is there any reason why meta:Reference Tooltips can't just be used, removing the need for a reflist? ― Qwerfjkltalk 21:41, 29 August 2021 (UTC)

Is there a reason? Yes. Accessibility, for a big one. —David Eppstein (talk) 22:55, 29 August 2021 (UTC)
and print —TheDJ (talkcontribs) 11:30, 30 August 2021 (UTC)

ERROR: |liststyle:

You are unable to use "|liststyle=" in this template to make an unordered list (i.e. dot point lists), because it does not change the HTML from "<ol> </ol>" to "<ul> </ul>" allowing an unordered list. This can cause issues. — Preceding unsigned comment added by Geordannik (talkcontribs)

See Template:Reflist#List styles for some supported options. Feel free to link to a page where you are trying to make this work. – Jonesey95 (talk) 13:59, 6 September 2021 (UTC)

Template:Notelist

I was about to remove the column count parameter from a Template:Notelist but checked the template documentation first, and it does not say that the count param is deprecated, nor does it document the colwidth param. Should the Notelist documentation be updated to say the same thing as Reflist about columns? GA-RT-22 (talk) 01:43, 25 December 2021 (UTC)

I have clarified the documentation for {{notelist}}. – Jonesey95 (talk) 05:47, 25 December 2021 (UTC)

Desktop default not making multiple columns

  Fixed

In this version of the Russian invasion article, without any hardwired column-width or number of columns, in desktop firefox with a very wide window, and with either my default fontsize or five sizes smaller, I only get one single column. There are 677 references, which is more than 10.

Could there be something forcing a single column somewhere else in the page? presumably earlier, or inside of the same html or mediawiki scope?

It would be better to handle this at the source of the bug rather than hardwiring the column width, which, as I understand it, is not recommended, even though it remains as a suggestion in the template documentation. Feel free to fix this at 2022 Russian invasion of Ukraine directly. Boud (talk) 01:38, 9 April 2022 (UTC)

The reflist template had references in the first unnamed parameter instead of in |refs=. I fixed it. – Jonesey95 (talk) 04:59, 9 April 2022 (UTC)
Nice :). It was completely obvious but I didn't see it. Boud (talk) 10:53, 9 April 2022 (UTC)

Defaults in mobile vs desktop mode

I typically use <references /> rather than {{Reflist}} when I create a new article because I use VE, which can't refresh the references within a template, and because I understood the behaviour was identical -- that is, that reflist with no parameters uses the defaults that one gets with <references />. I just found out this is not the case. The last two revisions of The Trundle look identical on my iPad in mobile mode, but if I request the desktop version, I get a single column with <references /> but two columns with reflist. I don't have my laptop with me so I can't check what it looks like on a PC. I tried looking in the Mediawiki documentation for an explanation but couldn't find anything that explained this behaviour. Is there any documentation that explains exactly when the two differ? Mike Christie (talk - contribs - library) 11:38, 18 February 2022 (UTC)

This is because the reflist resets the font-size twice.. As a side effect of this, the one usage has a 30em cut off calculated in 100% of the font-size, the other has a 30em max column width in 90% of the font-size. We should really remove this hack from this template to make it consistent... That might also cause the 30em to be a little bit to big actually, so maybe we need to do something about that as well... Ideally we would set the font size on the responsive wrapper itself, but we still have non-responsive mode that has to be consistent in size... —TheDJ (talkcontribs) 11:20, 8 March 2022 (UTC)
TheDJ, what would it take to make this change? I think it would be best if the template did match the behaviour of the raw tag; that was the intent of defaulting to 30em, I believe. Mike Christie (talk - contribs - library) 11:42, 7 April 2022 (UTC)
We're going to need to reassess the defaults on this regardless when new Vector rolls out. With fixed width, I anticipate 30ems may just barely fit two columns into the main content column.
I agree that the template should match the raw tag on column sizing behavior, I just couldn't figure it out the last time I looked. Izno (talk) 21:36, 27 May 2022 (UTC)

Parsoid does not play well with Reflist

It appears that if there's no whitespace in front of {{Reflist}}, Parsoid doesn't parse the wikitext correctly (see T292277 for details). The opinion from the parsoid folks is that it's not fixable in Parsoid. Is there anything that could be done in the template to work around this problem? -- RoySmith (talk) 22:03, 1 October 2021 (UTC)

It might actually help if you move the <templatestyles src="Reflist/styles.css" /> inside of the <div class="reflist" … >. Matma Rex talk 22:34, 1 October 2021 (UTC)
This can cause an FOUC and is not an appropriate fix. Izno (talk) 20:41, 12 October 2021 (UTC)
@Izno I don't think that's the case, can you show an example of that? Matma Rex talk 20:05, 11 January 2022 (UTC)
Matma Rex My assertion is based on my understanding that HTML parsers will go node to node in order down the tree in the order the file is read. If the style element targeting the element of interest comes after the element, that means the HTML parser needs to get to that element first. Meanwhile, in parallel systems (I understand Firefox to be and I expect Chrome to be also), the CSS parser will have gotten a job or some other indication to start styling the element of interest, before it will have gotten to the style definition. This also assumes the jobs system employed by the browser doesn't take care of all elements at any given DOM level first and then proceed to jobs at lower DOM levels.
In practice it may not show up much, but FOUCs are basically predicated on some data race existing anyway (or total misstyling I guess). I prefer to guarantee the non-existence of FOUCs, so styles go before elements. Hence why I used the word 'can'.
I know for a fact that bottom/late loading styles, such as MediaWiki:Mobile.css, causes FOUCs, so it may be a matter of distance from the element to the styles of interest. Maybe that's a different root cause, but I'm pretty sure it's not.
Regardless of this question with reflist, you will want to review phab:T303378, where the only workaround I know is to move any identified templatestyles tags (or their strip marker forms I guess, I haven't started working on the problem) out of their containing elements. You can call that a hard blocker for those particular components having internal TemplateStyles, so, work still needs to happen on the WMF side.
In general, I would much rather VE not be dumb. Izno (talk) 21:54, 27 May 2022 (UTC)
@Izno Hmm, you're right that it theoretically allows FOUC, although it seems nearly impossible in practice. Something would have to cause the browser to render a page exactly after it received the <div class="reflist" … >, but before it received the <style>…</style>, and in my experience they really don't want to render anything while still receiving the HTML (it's also freaking impossible to search for information about this, all I get in results is barely better than SEO junk). But I was able to make a sufficiently slow-loading website and reproduce it myself.
(And on top of that, the rendering of <div class="reflist" … > would have to be something visible – most elements don't have any content or borders etc. unless you add some in your CSS/HTML, and in this situation it hasn't loaded yet.)
I didn't know MediaWiki:Mobile.css causes FOUC. I looked into how it's loaded, and this is a different situation: it is loaded from the JavaScript code after the page HTML has finished loading. This obviously causes a FOUC, and I don't really understand why it's done this way. It was apparently supposed to be solved in 2018, but then wasn't: T190083.
I also didn't know about T303378, and you're right that it seems like a blocker in some cases (although not this one, right?). I outlined a solution there, I don't think I'll work on implementing it, but I would help review a patch if someone had a try at it.
I'd also prefer VE to not be dumb, but sometimes making the wikitext not be dumb is also an option ;) Matma Rex talk 02:19, 1 June 2022 (UTC)
Consider leaving some part of this comment on the related task, where I also copied (and added a bit). Izno (talk) 02:37, 1 June 2022 (UTC)
I don't feel like it adds much to that discussion? But feel free to quote me if I accidentally said something smart. Matma Rex talk 20:23, 1 June 2022 (UTC)
Up to you. Izno (talk) 22:38, 4 June 2022 (UTC)

"Template:Rfs" listed at Redirects for discussion

  An editor has identified a potential problem with the redirect Template:Rfs and has thus listed it for discussion. This discussion will occur at Wikipedia:Redirects for discussion/Log/2022 June 11#Template:Rfs until a consensus is reached, and readers of this page are welcome to contribute to the discussion. – Jonesey95 (talk) 20:23, 11 June 2022 (UTC)

"Template:RFS" listed at Redirects for discussion

  An editor has identified a potential problem with the redirect Template:RFS and has thus listed it for discussion. This discussion will occur at Wikipedia:Redirects for discussion/Log/2022 June 11#Template:RFS until a consensus is reached, and readers of this page are welcome to contribute to the discussion. – Jonesey95 (talk) 20:24, 11 June 2022 (UTC)

liststyle and group

Copied from my talk page:

Hi Izno,

I noticed that a few months ago you updated {{reflist}} to use templatestyles, it seems that in the process the liststyle function seems to have gotten broken.

using {{Reflist|group=note|liststyle=lower-alpha}} is supposed to produce a references tag for the group "notes" with the liststlye "lower-alpha", but running it through Special:expandtemplates produces:

<templatestyles src="Reflist/styles.css" /><div class="reflist   " style=" ">
<references group="note" responsive="1"></references></div>

with both the class and the style being empty.

Looking through the template code I think the mistake is a combination of the lines

{{#switch:{{{group|}}}|upper-alpha|upper-roman|lower-alpha|lower-greek|lower-roman=reflist-{{{group}}}}}

Which applies the "group" parameter unconditionally if it matches one of the allowed values and

{{#if:{{{group|}}}||{{#if:{{{liststyle|}}}|list-style-type: {{{liststyle}}};}}}}

Where you are only applying the liststyle setting if the group parameter is empty?

I think you have your checks back to front here, the liststlye parameter should always be getting applied if it is set, and the group parameter should only be setting the CSS if the liststyle parameter is empty?

I think the first line should be

{{#if:{{{liststyle|}}}||{{#switch:{{{group|}}}|upper-alpha|upper-roman|lower-alpha|lower-greek|lower-roman=reflist-{{{group}}}}}}}

and the second

{{#if:{{{liststyle|}}}|{{#if:{{{liststyle|}}}|list-style-type: {{{liststyle}}};|}}}}

Do you agree? 192.76.8.78 (talk) 21:28, 27 May 2022 (UTC)

Let me look. Izno (talk) 21:32, 27 May 2022 (UTC)
So, looking at what I did and what I commented on the talk page:
  1. When I TemplateStyled the page, I did leave a note that I think |liststyle= should be removed. However, it remains. (Someone should work on that; I have similar counts for dis-use today as posted then.)
  2. So this being broken is my misinterpreting how this piece was supposed to work, I agree.
  3. Regardless, I agree with my statement then that if you're using note groups you should be using {{notelist}}, which I'm guessing is the case I was thinking about.
  4. The test cases page works when you set group.
  5. I can say that your suggested first line is wrong. The idea is that reflist always supplies the appropriate CSS for the set of groups. I think this gets fixed, with loss of flexibility (that is mostly unneeded) if we just make the two synonyms in the template in the HTML context. In other words:
    {{#switch:{{{liststyle|{{{group|}}}}}}|upper-alpha|upper-roman|lower-alpha|lower-greek|lower-roman=reflist-{{{liststyle|{{{group}}}}}}}}}}
    with simple removal of the hard-coded style later.
I think I still favor 'working around' the issue by using t:notelist. Will have to investigate to see what all the uses of liststyle are doing today. Izno (talk) 01:23, 28 May 2022 (UTC)
(Of interest: it's been a year and you're the first one to catch the bug.) Izno (talk) 01:26, 28 May 2022 (UTC)
Your proposed fix is a lot more elegant than my suggestion, the second line of my proposed fix is also stupidly written in that it has two identical if statements nested inside each other. I probably shouldn't be trying to debug templates in the middle of the night.
The reason I noticed this bug was a question at the teahouse. There's an editor there who wants to write an article full of tables, each one of which contains notes with references in them with a separate notelist immediately following each table. With the notelist template's current implementation there is no way of having note groups with names other than the 6 numbering schemes. The person I was talking to at the teahouse didn't like the solution I proposed of using the different families of notelists as it would have resulted in each of their tables having a different numbering system, which brings us to using reflist template with custom group names, at which point I had a play with the liststyle parameter and realised it wasn't working properly. 192.76.8.78 (talk) 02:02, 28 May 2022 (UTC)

I may not be able to get to this Soon. If someone could double check that my suggested change works, that would be appreciated. :^) Izno (talk) 22:38, 4 June 2022 (UTC)

Made this change. Izno (talk) 23:00, 11 June 2022 (UTC)

Faulty in some articles?

I do not know if it is just me, or the Reflist template is failing to render at LGBT rights by country or territory? --Minoa (talk) 06:48, 25 June 2022 (UTC)

It's not specific to {{reflist}} – all templates at the end of the article are failing. Is the article so big that it's hit an expansion limit? Kanguole 06:57, 25 June 2022 (UTC)
It appears in the hidden category:Pages where post-expand include size is exceeded. Keith D (talk) 11:22, 25 June 2022 (UTC)
I switched to using <references /> which helped but more templates need to be removed. Mike Christie (talk - contribs - library) 15:16, 25 June 2022 (UTC)

Does the template really provide any advantage over the "<references>" XML tag?

    Reference: https://www.mediawiki.org/wiki/Special:Search?fulltext=1&search=%3Creferences%3E

- MasterQuestionable (talk) 02:10, 19 August 2022 (UTC)

Yes. It accepts parameters. – Jonesey95 (talk) 12:25, 19 August 2022 (UTC)
My not so through analysis on the 2 seems to indicate there are few (if not none) functional differences between them. - MasterQuestionable (talk) 06:41, 20 August 2022 (UTC)
I use the |refs= parameter of {{reflist}} all the time. As far as I know that cannot be handled with a pure references tag. The unnamed column width parameter is also useful sometimes, mostly to match up the appearance of separate footnote and bibliography sections; it could probably be handled separately by wrapping in some other column templates, but that would be more cumbersome and not really help reduce your usage of templates. —David Eppstein (talk) 07:33, 20 August 2022 (UTC)
@David Eppstein, the equivalent with a pure references tag is <references><ref>...</ref>...</references>. Izno (talk) 19:10, 24 October 2022 (UTC)

    My apologies for not responding for relatively long time.
    Some of my edit attempts on <Byte> (also discussed in <Talk:Byte> # [20220818] On recent editing that had references "broken") should already reveal much about the subject. (may not completely due to the implementation problem in current MediaWiki)

- MasterQuestionable (talk) 06:13, 22 September 2022 (UTC)

Any way to use this template to see all refs?

I'm trying to generate an output having all references in order, as they appear in the article using reflist, but with all the Wiki-markup - i.e. including the various parameters (date= |, title= |, etc.). Is there any way to do this using this template?

When I copy the reflist as it appears in the article, I get a list, but it's only the shown text (no markup). And when I try dig into an article source, or export an article as xml, the only thing I can find is "{reflist}" (unexpanded, no list). PhotogenicScientist (talk) 22:45, 13 January 2023 (UTC)

One of the user scripts at Wikipedia:User scripts/List#References 2 might help you do what you are hoping to do. Look especially at User:Dr pda/editrefs.js and User:Kaniivel/Reference Organizer. I haven't tested them, so YMMV and caveat emptor and all that. – Jonesey95 (talk) 02:14, 14 January 2023 (UTC)
Reference Organizer did the trick! Thanks for the tip. PhotogenicScientist (talk) 17:19, 14 January 2023 (UTC)

Edit request 12 February 2023

Hello. Would it be possible to edit this template in such a way, that a particular (hidden) category would be added to the articles that have more than 800 references? On Marathi wikipedia, I repaired infobox film, it basically adds Category:<language> films from <production year>" to the article, if production year parameter is present in the infobox. (निर्मिती वर्ष = production year, मधील = from भाषा = language, चित्रपट = film)

{{
#if:{{{निर्मिती वर्ष|}}}
|{{#ifexist: वर्ग:इ.स. {{{निर्मिती वर्ष}}} मधील {{{भाषा}}} चित्रपट|[[वर्ग:इ.स. {{{निर्मिती वर्ष}}} मधील {{{भाषा}}} चित्रपट]]}}
}}

In short, I want Category:Articles with many references (temporary/placeholder name) to be populated by articles with more than 800 references. Would this be possible? —usernamekiran (talk) 16:13, 12 February 2023 (UTC)

  Not done Don't know what that infobox code has to do with {{reflist}}. I don't think that what you want {{reflist}} to do is possible because this template doesn't actually see the references. This template marks the location in the article where the reference list will be placed and specifies the list's styling.
Trappist the monk (talk) 16:25, 12 February 2023 (UTC)
@Trappist the monk: Hi. Thanks for the prompt response. The infobox code was just an example. How would I be able to populate that particular category automatically? (without scanning the pages, I have already created a script/bot for that, but it is not feasible for large-scale use). —usernamekiran (talk) 16:41, 12 February 2023 (UTC)

Delete 30em from {{Reflist|30em}}?

The docs clearly specifies 30em as default size. Should I delete 30em if specified in articles? <_> jindam, vani (talk) 06:29, 6 January 2023 (UTC)

I would prefer that you didn't delete these. The value may represent an editor's considered judgement of what is needed in a particular reference list, which would be useful if the default ever changed. Kanguole 10:46, 6 January 2023 (UTC)
I can't think of any legitimate reason for somebody to specify the width of the reflist, let alone hard-wire the default value into the template call. That's a presentation decision. Article authors should be concentrating on marking up content to describe the structure of the document, not the presentation details. -- RoySmith (talk) 14:26, 6 January 2023 (UTC)
You need to develop your imagination a little more. The usual reason I would do this is that I want the {{reflist}} columnization to match the columnization of a {{refbegin}}/{{refend}} on another part of the references, and I don't trust the templates to have default parameters that stay in synch (they currently don't, for instance). —David Eppstein (talk) 19:01, 6 January 2023 (UTC)
I've noticed that {{Reflist}} columns have been hit-or-miss since last year (when deployed without a parameter). I've been wondering if the template was changed due to the new Vector 2022 skin. Thank you for the above insight. — CJDOS, Sheridan, OR (talk) 04:10, 8 February 2023 (UTC)
More likely what you are seeing is that the default behavior is to make columns only when the number of references is large enough. If there are only a small number (I don't remember what the cutoff is), it will keep them all in a single column. —David Eppstein (talk) 17:52, 8 February 2023 (UTC)

That's not what I see in desktop view, David. When I'm logged-out of Wikipedia, the articles Barcelona and Monopoly (game) have well over 150 inline citations, and list as two-column. When logged-in to Wikipedia, however, the inline citations list as single-column. I would expect {{Reflist}} to display columns regardless of my login status. — CJDOS, Sheridan, OR (talk) 10:21, 27 February 2023 (UTC)

Might you be using the Vector 2022 interface? On my device (using Microsoft EDGE on Windows desktop), that interface displays a tools list on the right-hand side of the page. That list appears to take up enough screen/display real-estate to cause reflist to display refs in a single column. If I change the browser's zoom level to 90%, it displays in two columns. When logged out with zoom set to 100%, the tools menu is not displayed, and refs are shown in two columns. If I use the Vector legacy (2010) interface, I see two columns when logged on. At least that is my experience. — Archer1234 (t·c) 10:58, 27 February 2023 (UTC)
Upon further testing, I discovered that one of the scripts I have loaded in my common.js for AutoEd caused the tools menu to display persistently on the right-hand side of the Vector 2022 interface, with no ability to close/hide/collapse the menu. This is what reduced the screen/display real-estate. When I removed "AutoEd" from common.js, the tools menu appeared collapsed/hidden, the screen/display real-estate was restored to normal, and the two-column display of references was restored when logged in to pages like Barcelona and Monopoly (game). YMMV. — Archer1234 (t·c) 11:43, 27 February 2023 (UTC)
That is correct. Wikipedia switched me to the Vector 2022 view (I certainly don't like it), but I left it rather than switching back to legacy view as that's the default (so I would see what most others see). That seems to be the answer to the Reflist columns on/off. I will try keeping my browser at 90% view for Wikipedia; thank you for your assistance.   — CJDOS, Sheridan, OR (talk) 17:56, 27 February 2023 (UTC)
What about these Enable responsive mode and Enable limited width mode just below the skin choices? I assume the latter just wraps text that would otherwise require a horizontal scroll bar (excludes tables and boxes), but what does the former do? I didn't find much of an explanation for either, but they're both ticked by default. — CJDOS, Sheridan, OR (talk) 18:11, 27 February 2023 (UTC)

List-defined references

Are these useful/popular? It's inconvenient to be unable to edit them in the Visual Editor, and I'm wondering if this is really a feature worth keeping. DFlhb (talk) 16:43, 27 March 2023 (UTC)

I prefer them. It is inconvenient to edit article text broken up by paragraph-length chunks of stuff that is not article text. Putting the reference details elsewhere helps with that. Your experience with Visual Editor may not be typical; I use the source editor. —David Eppstein (talk) 17:34, 27 March 2023 (UTC)
Fine; I'll ask for VE to add support then. DFlhb (talk) 17:51, 27 March 2023 (UTC)

Overlap content

On Diplomatic uniform I discovered a problem for this template that the references overlap an image. Who can fix it? -- Great Brightstar (talk) 12:50, 13 April 2023 (UTC)

Putting {{clear}} before the References section fixes the overlap problem. The root cause is probably too many images on the page. – Jonesey95 (talk) 14:00, 13 April 2023 (UTC)

"Template:RefIist" listed at Redirects for discussion

  The redirect Template:RefIist has been listed at redirects for discussion to determine whether its use and function meets the redirect guidelines. Readers of this page are welcome to comment on this redirect at Wikipedia:Redirects for discussion/Log/2023 September 13 § Template:RefIist until a consensus is reached. SWinxy (talk) 05:17, 13 September 2023 (UTC)

Discussion at Help talk:Footnotes § List-defined references in the Visual Editor

  You are invited to join the discussion at Help talk:Footnotes § List-defined references in the Visual Editor. Rjjiii(talk) 03:45, 22 September 2023 (UTC) If list-defined references work in Visual Editor only without this template, then it probably should not be used to create them. Rjjiii(talk) 03:45, 22 September 2023 (UTC)