Category talk:All articles with duplicate citations
Duplicated citations from excerpted texts and templates
[edit]Recently a lot of COVID articles got a cleanup tag added for duplicated citations. Example: [1] Many of these are easily resolvable, but some I don't know or am unsure how to address because they aren't "simple" duplicates. There are six situations I have noticed:
- 1. An excerpted text has a citation that is also in the article.
- 2. A template has a citation that is also in the article.
- 3. Multiple excerpted texts on an article use the same citation.
- 4. Multiple templates on an article use the same citation.
- 5. An excerpted text and a template use the same citation on the same article.
- 6. Same as 3, 4, and 5, but that citation is also in the article outside of an excerpt or template (i.e. 3-way duplication).
In all of these situations, a citation is duplicated and gets flagged as an issue, but I don't know how to resolve it well. Note that this issue is included in the cleanup listings under the "Reference cleanup" section.[2]
A couple of workarounds:
- 1. One way is to not use a citation in an article if it's in an excerpted text or template, but that only works for situations 1 and 2 listed above and seems impractical at times since related articles will have some overlap in citations. The opposite of this is to replace the citation in the text being excerpted, but that may duplicate another citation.
- 2. Another way is to replace excerpted texts with the actual text, which would make it easy to remove the duplicated citation but this only works for situations 1 and 3. If combined with the 1st workaround, then situation 5 can also be resolved. I have replaced excerpted texts in the past to resolve harv/sfn no-target errors (another issue caused by excerpting text), but my edits were reverted and the problem fixed through other means, so I'm wondering if there's a way to deal with this besides replacing excerpts.
I haven't thought of a way to resolve situation 4. It would be good if this were resolved in some way since it's included in the cleanup listings and there's an unsightly cleanup template at the top of affected articles.
Pinging some people who may know what to do: @Folkezoft:, @Polygnotus:, @Trappist the monk:, @Headbomb:, @Mathglot:, @Sadads:, @Jlwoodwa:, @Andrybak:
Velayinosu (talk) 01:59, 3 July 2025 (UTC)
- Velayinosu, In general, you can resolve situation 4 by adding
|references=no
|inline=yes
to the {{excerpt}}, and then adding a named reference right after the excerpt template which brings in the the paragraph in which the citation appears in the excerpted source (but is suppressed), and point the named reference to the 'duplicate' citation that appears in this article. If the excerpt is multiple paragraphs, it might make sense to break it into multiple excerpts of one paragraph each, so you can tack on the named refs separately to each one, so they all appear at the end of the excerpted paragraph in which the citation appears in the original. If you want a more specific explanation of how to do that, please point out an explicit case of #4 in the article and I will explain how or do it for you, and you can copy the technique to other examples. P.S., that is probably pinging too many people. Mathglot (talk) 02:09, 3 July 2025 (UTC)- Mathglot sorry I just didn't know who had knowledge of how to deal with this so I just pinged a bunch of people who I thought might. An example of situation 4 is that COVID-19 pandemic by country and territory has two citations from two different templates (refs 6 and 22). I don't know what to do with that. This article also has the "template + article" duplicate (situation 2) (refs 25 and 96). Velayinosu (talk) 02:22, 3 July 2025 (UTC)
- Okay, I see that: #6 has abcde, corresponding to five Infobox refs, and #22 has ab, with refs in Table headers in two sections: § Total cases, deaths, and death rates by country and § Vaccinations, which are brought in respectively by templates {{COVID-19 pandemic death rates}}}} and {{COVID-19 vaccination data}}, both referencing source Mathieu et al.
- What is it you would like to do, have it so that you just have #6 abcdefg ? It is doable, but it may be at some cost to simplicity, as it will involve adding
{{excerpt|Template:FOO|hat=no|inline=yes|references=no}}
in a bunch of places (where FOO is one or the other of the table templates), and then having to tack on the Mathieu citation as well, using {{COVID-19 data/cite}}, and the superscript citation number[6] will be after the table, instead of part of it and located in the table header. (Even that would be fixable, but that would be a breaking change to the citation template, and since the template tables are widely excerpted, that hardly seems worth the trouble.) - To what extent is the duplication of the Mathieu et al. citation an issue that needs to be fixed? If it is constantly showing up in some database of duplicate refs, there may be another approach that involves whitelisting it so it no longer appears. Would that be satisfactory? I'm just not sure fixing this is worth the effort, especially since the result will be more opaque to most users who are not pretty comfortable with the somewhat abstruse {{excerpt}} template. It may be best to leave good-enough things alone. Mathglot (talk) 03:16, 3 July 2025 (UTC)
- Mathglot sorry I just didn't know who had knowledge of how to deal with this so I just pinged a bunch of people who I thought might. An example of situation 4 is that COVID-19 pandemic by country and territory has two citations from two different templates (refs 6 and 22). I don't know what to do with that. This article also has the "template + article" duplicate (situation 2) (refs 25 and 96). Velayinosu (talk) 02:22, 3 July 2025 (UTC)
- @Velayinosu: You should check out meta:WMDE_Technical_Wishes/Sub-referencing, specifically meta:WMDE_Technical_Wishes/Sub-referencing#test. Polygnotus (talk) 02:24, 3 July 2025 (UTC)
- @Velayinosu: See also User:Polygnotus/DuplicateReferences. Polygnotus (talk) 07:20, 3 July 2025 (UTC)