| archive = Module talk:Footnotes/Archive %(counter)d
| algo = old(180d)
| counter = 23
| maxarchivesize = 200k
| minthreadsleft = 8
| minthreadstoarchive = 2
}}
== Consolidated updates ==
== Push to clear the last few ones. ==
{{u|Renata3}} there's a few updates waiting to be done, could you add the following entries?<br>
['CITEREFMarshall1969'] = {'Lancashire & Yorkshire Railway 1'},
['CITEREFMarshall1970'] = {'Lancashire & Yorkshire Railway 2'},
['CITEREFRowling1997'] = {'HP1ref'},
['CITEREFRowling1998'] = {'HP2ref'},
['CITEREFRowling1999'] = {'HP3ref'},
['CITEREFRowling2000'] = {'HP4ref'},
['CITEREFRowling2003'] = {'HP5ref'},
['CITEREFRowling2005'] = {'HP6ref'},
['CITEREFRowling2007'] = {'HP7ref'},
['CITEREFShiji'] = {'Cite Shiji'},
['CITEREFSima'] = {'Cite Shiji'},
['CITEREFSimaSima'] = {'Cite Shiji'},
See [[Wikipedia:Bot requests#Help clear Category:Harv and Sfn no-target errors]].
Thanks, -- <small>LCU</small> '''[[User:ActivelyDisinterested|A<small>ctively</small>D<small>isinterested</small>]]''' <small>''«[[User talk:ActivelyDisinterested|@]]» °[[Special:Contributions/ActivelyDisinterested|∆t]]°''</small> 10:52, 5 August 2024 (UTC)
 <span style="font-variant:small-caps; whitespace:nowrap;">[[User:Headbomb|Headbomb]] {[[User talk:Headbomb|t]] · [[Special:Contributions/Headbomb|c]] · [[WP:PHYS|p]] · [[WP:WBOOKS|b]]}</span> 22:05, 25 January 2025 (UTC)
:{{done}} [[User:Renata3|Renata]]•[[User talk:Renata3|3]] 03:14, 6 August 2024 (UTC)
::Thanks Renata. -- <small>LCU</small> '''[[User:ActivelyDisinterested|A<small>ctively</small>D<small>isinterested</small>]]''' <small>''«[[User talk:ActivelyDisinterested|@]]» °[[Special:Contributions/ActivelyDisinterested|∆t]]°''</small> 10:23, 6 August 2024 (UTC)
::Thank you -- [[User:Nempnet|Nempnet]] ([[User talk:Nempnet|talk]]) 13:57, 8 August 2024 (UTC)
== "n.d.a" vs. "n.d. a" ==
== Notice: discussions on WMDE sub-reference project in progress at Meta ==
At [[Capri-Sun]], I have two references that I'd written as <code><nowiki>{{harvnb|Capri Sun Group|n.d. a}}</nowiki></code> and <code><nowiki>{{harvnb|Capri Sun Group|n.d. b}}</nowiki></code>. I could've sworn they worked as intended when they were added, but maybe I just overlooked this before, because I don't spot anything relevant in the history. Either way, as it stands, these render as "[[Capri-Sun#CITEREFCapri Sun Groupn.d. a|Capri Sun Group & n.d. a]]" and ""[[Capri-Sun#CITEREFCapri Sun Groupn.d. b|Capri Sun Group & n.d. b]]", which appears to be because [[Module:Footnotes#L-131|L131]] is expecting no space before the disambiguating letter. But I don't think most people would write "n.d.a", which looks like the ''a'' is part of an acronym. "n.d. a" is much clearer. I would suggest that both should be allowed, as should "nd a" in contrast to "nda". I believe all we'd have to do is add a <code> ?</code> before the <code>%l</code> on lines 65, 66, 131, and 132. <span style="font-family:courier"> -- [[User:Tamzin|<span style="color:#E6007A">Tamzin</span>]]</span><sup class="nowrap">[[[User talk:Tamzin|<i style="color:#E6007A">cetacean needed</i>]]]</sup> <small>([[User:Tamzin/🤷|they|xe|🤷]])</small> 03:06, 7 April 2025 (UTC)
The [[m:Talk:WMDE Technical Wishes/Sub-referencing|WikiMedia sub-referencing project]] (parent project: [[m:WMDE Technical Wishes/Reusing references|Reusing references]]) is having multiple discussions about the development of a sub-referencing feature by [[mw:WMDE Engineering|WikiMedia Deutschland Engineering]]. Your feedback would be welcome at any of the discussons at [[m:Talk:WMDE Technical Wishes/Sub-referencing]]. [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 20:58, 23 August 2024 (UTC)
:Those references appear to be working as expected and I'm seeing them displayed with a space between n.d. and the disambiguation. What error message are you seeing? It may have to do with the script you're using -- <small>LCU</small> '''[[User:ActivelyDisinterested|A<small>ctively</small>D<small>isinterested</small>]]''' <small>''«[[User talk:ActivelyDisinterested|@]]» °[[Special:Contributions/ActivelyDisinterested|∆t]]°''</small> 11:12, 7 April 2025 (UTC)
== Another whitelist request ==
::@[[User:ActivelyDisinterested|ActivelyDisinterested]]: The issue isn't the space falling to render; it's the ampersand showing up because the module reads "n.d. a" as a name rather than a date <span style="font-family:courier"> -- [[User:Tamzin|<span style="color:#E6007A">Tamzin</span>]]</span><sup class="nowrap">[[[User talk:Tamzin|<i style="color:#E6007A">cetacean needed</i>]]]</sup> <small>([[User:Tamzin/🤷|they|xe|🤷]])</small> 14:27, 7 April 2025 (UTC)
:::{{harvnb|Capri Sun Group|n.d.a}}
:::{{harvnb|Capri Sun Group|n.d.b}}
:::{{harvnb|Capri Sun Group|1997a}}
:::Without spaces ↑
:::{{harvnb|Capri Sun Group|n.d. a}}
:::{{harvnb|Capri Sun Group|n.d. b}}
:::{{harvnb|Capri Sun Group|1997 a}}
:::With spaces ↑ [[User:Rjjiii|<span style="font-variant:small-caps;">Rjj<sup>iii</sup></span>]] ([[User talk:Rjjiii|talk]]) 14:31, 7 April 2025 (UTC)
::::Yes, a space makes the module read it as a name rather than a date, and this put an ampersand before it. What I'm saying is that, while that's reasonable for years like 1997a, for n.d. in particular a space should be understood as part of the date. <span style="font-family:courier"> -- [[User:Tamzin|<span style="color:#E6007A">Tamzin</span>]]</span><sup class="nowrap">[[[User talk:Tamzin|<i style="color:#E6007A">cetacean needed</i>]]]</sup> <small>([[User:Tamzin/🤷|they|xe|🤷]])</small> 15:01, 7 April 2025 (UTC)
:::::Sorry misconstrued the issue. -- <small>LCU</small> '''[[User:ActivelyDisinterested|A<small>ctively</small>D<small>isinterested</small>]]''' <small>''«[[User talk:ActivelyDisinterested|@]]» °[[Special:Contributions/ActivelyDisinterested|∆t]]°''</small> 15:10, 7 April 2025 (UTC)
::::::I think the pre-module version of the harv/sfn templates always treated the final parameter as the year, [[User:Rjjiii|<span style="font-variant:small-caps;">Rjj<sup>iii</sup></span>]] ([[User talk:Rjjiii|talk]]) 20:54, 7 April 2025 (UTC)
::::::@[[User:Tamzin|Tamzin]] & [[User:ActivelyDisinterested|ActivelyDisinterested]]:
::::::[https://blog.apastyle.org/apastyle/2011/10/reference-twins.html APA uses n.d.-x]. It seems like [https://files.taylorandfrancis.com/tf_chicagoad.pdf Chicago] and [https://libguides.jcu.edu.au/HarvardAGSM/dates Harvard] referencing do as well. I've added the pattern for that to the sandbox module:
::::::;Live
::::::{{harvnb|Capri Sun Group|n.d.-a}}
::::::;Sandbox
::::::{{Harvard citation no brackets/sandbox|Capri Sun Group|n.d.-a}}
::::::But you'd also need to add support in [[Module:Citation/CS1]]. Right now it gives an error if you suffix anything to n.d. separated by a hyphen or space (only {{harvnb|Capri Sun Group|n.d.a}} works):
::::::* {{citation|author=Capri Sun Group |date=n.d. |title=Frequently Asked Questions |work=Capri-Sun.com |mode=cs1}}
::::::* {{citation|author=Capri Sun Group |date=n.d.a |title=Frequently Asked Questions |work=Capri-Sun.com |mode=cs1}}
::::::* {{citation|author=Capri Sun Group |date=n.d. a |title=Frequently Asked Questions |work=Capri-Sun.com |mode=cs1}}
::::::* {{citation|author=Capri Sun Group |date=n.d.-a |title=Frequently Asked Questions |work=Capri-Sun.com |mode=cs1 |ref={{sfnref|Capri Sun Group|n.d.-a}}}}
::::::Also some stats while thinking about changes:
::::::* 5,041,630 pages [https://en.wikipedia.org/wiki/Special:Search?go=Go&search=hastemplate%3Acite_web&ns0=1&ns1=1&ns2=1&ns3=1&ns4=1&ns5=1&ns6=1&ns7=1&ns8=1&ns9=1&ns10=1&ns11=1&ns12=1&ns13=1&ns14=1&ns15=1&ns100=1&ns101=1&ns118=1&ns119=1&ns126=1&ns127=1&ns710=1&ns711=1&ns828=1&ns829=1 with cite web]
::::::* 15,112 pages [https://en.wikipedia.org/wiki/Special:Search?go=Go&search=hastemplate%3Acite_web+insource%3A%22date%3Dn.d.%22&ns0=1&ns1=1&ns2=1&ns3=1&ns4=1&ns5=1&ns6=1&ns7=1&ns8=1&ns9=1&ns10=1&ns11=1&ns12=1&ns13=1&ns14=1&ns15=1&ns100=1&ns101=1&ns118=1&ns119=1&ns126=1&ns127=1&ns710=1&ns711=1&ns828=1&ns829=1 with cite web using n.d.]
::::::* 45 pages [https://en.wikipedia.org/wiki/Special:Search?go=Go&search=hastemplate%3Acite_web+insource%3A%22date%3Dn.d.a%22&ns0=1&ns1=1&ns2=1&ns3=1&ns4=1&ns5=1&ns6=1&ns7=1&ns8=1&ns9=1&ns10=1&ns11=1&ns12=1&ns13=1&ns14=1&ns15=1&ns100=1&ns101=1&ns118=1&ns119=1&ns126=1&ns127=1&ns710=1&ns711=1&ns828=1&ns829=1 with cite web and n.d.a] (without spaces)
::::::* 55% of cite web invocations [https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=Cite+web have no date parameter] (not an issue without author-date short citations)
::::::I'd support adding support to both modules for "n.d.-" if that's the norm in published citation styles. [[User:Rjjiii|<span style="font-variant:small-caps;">Rjj<sup>iii</sup></span>]] ([[User talk:Rjjiii|talk]]) 11:01, 8 April 2025 (UTC)
:::::::Continued at: [[Help_talk:Citation_Style_1#"n.d.a",_"n.d._a",_or_"n.d.-a"]] [[User:Rjjiii|<span style="font-variant:small-caps;">Rjj<sup>iii</sup></span>]] ([[User talk:Rjjiii|talk]]) 03:31, 12 April 2025 (UTC)
::::::::So far, no response at all over there. Idk if it's a good idea to add support for a type of date in only one of the modules. [[User:Rjjiii|<span style="font-variant:small-caps;">Rjj<sup>iii</sup></span>]] ([[User talk:Rjjiii|talk]]) 04:36, 21 April 2025 (UTC)
== Re [[:Category:Harv and Sfn no-target errors]] ==
Hi @[[User:Renata3|Renata3]], there is more Tolkien (no surprise). I may or may not have gotten the format right this time:
I've been trying to whack down the amount of articles in this Category and have come across a List that I can't find any Harv errors or Harv warnings in, and yet here is [[List of fictional diseases]] listed amongst the error'fied articles. Can anyone tell me why? Thanks - [[User:Shearonink|Shearonink]] ([[User talk:Shearonink|talk]]) 03:33, 9 July 2025 (UTC)
['CITEREFTolkien2017']={'ME-ref|B&L'}
:It's a false positive, because {{tl|Cite MW}} is a template that wraps {{tl|cite web}}, and this module didn't know about it yet. I'll fix. Please feel free to report any such mysterious false positives here. Thanks for cleaning all of this up! — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 07:19, 9 July 2025 (UTC)
Thanks, [[User:Andy02124|Andy02124]] ([[User talk:Andy02124|talk]]) 16:50, 26 August 2024 (UTC)
:The Trappist script doesn’t flag false positives but the css modification (as described on the error page) does.
:[[User:Andy02124|Andy02124]] ([[User talk:Andy02124|talk]]) 12:08, 9 July 2025 (UTC)
::Thanks you guys for looking into it. Btw the Category has now inched up to 85.'''1'''% fixed/empty. Seems like it had been at a straight 85% for forever... - [[User:Shearonink|Shearonink]] ([[User talk:Shearonink|talk]]) 15:14, 9 July 2025 (UTC)
== Two additions ==
:Probably {'ME-ref'} is enough. [[User:Andy02124|Andy02124]] ([[User talk:Andy02124|talk]]) 16:51, 26 August 2024 (UTC)
::It should just be:
::['CITEREFTolkien2017'] = {'ME-ref'},
::The B&L isn't part of the template name. -- <small>LCU</small> '''[[User:ActivelyDisinterested|A<small>ctively</small>D<small>isinterested</small>]]''' <small>''«[[User talk:ActivelyDisinterested|@]]» °[[Special:Contributions/ActivelyDisinterested|∆t]]°''</small> 20:34, 26 August 2024 (UTC)
I use these templates pretty often and have had [[Talk:European rabbit#broken footnotes|several issues]] that have led me here. Can the following be added to the whitelist: [[Template:Lagomorphs2018]], [[Template:HMW2016 Volume 6]]
== Big ole whitelist request ==
['CITEREFSmithJohnstonAlvesHackländer2018'] = {'Lagomorphs2018'}
['CITEREFWilsonLacherMittermeier2016'] = {'HMW2016 Volume 6'} -- [[User:Reconrabbit|<span style="color:#4E8321">Recon</span>]][[User talk:Reconrabbit|<span class="skin-invert" style="color:#073131">rabbit</span>]] 17:24, 10 July 2025 (UTC)
[[Template:Cite Cambridge History of China]] (which I've had no involvement in yet) is needing the module-level whitelisting to avoid miscategorisation. There are (to date) seventeen volumes, so there are a lot of things.{{pb}}{{ping|Renata3}} can you add (*deep breath*):{{pb}}['CITEREFLoeweShaughnessy1999'] = {'Cite Cambridge History of China'}, ['CITEREFDienKnapp2019'] = {'Cite Cambridge History of China'}, ['CITEREFPeterson2016'] = {'Cite Cambridge History of China'}, ['CITEREFChaffeeTwitchett2015'] = {'Cite Cambridge History of China'}, ['CITEREFTwitchettSmith2009'] = {'Cite Cambridge History of China'}, ['CITEREFPeterson2002'] = {'Cite Cambridge History of China'}, ['CITEREFTwitchettMote1998'] = {'Cite Cambridge History of China'}, ['CITEREFMoteTwitchett1998'] = {'Cite Cambridge History of China'}, ['CITEREFFrankeTwitchett1994'] = {'Cite Cambridge History of China'}, ['CITEREFMacFarquharFairbank1991'] = {'Cite Cambridge History of China'}, ['CITEREFMacFarquharFairbank1987'] = {'Cite Cambridge History of China'}, ['CITEREFTwitchettLoewe1986'] = {'Cite Cambridge History of China'}, ['CITEREFFairbankFeuerwerker1986'] = {'Cite Cambridge History of China'}, ['CITEREFFairbank1983'] = {'Cite Cambridge History of China'}, ['CITEREFFairbankLiu1980'] = {'Cite Cambridge History of China'}, ['CITEREFTwitchett1979'] = {'Cite Cambridge History of China'}, ['CITEREFFairbank1978'] = {'Cite Cambridge History of China'}{{pb}} Thanks in advance and sorry. (Noting for clarity that "TwitchettMote1998" alongside "MoteTwitchett1998" is not an error) [[User:Folly Mox|Folly Mox]] ([[User talk:Folly Mox|talk]]) 14:58, 19 October 2024 (UTC)
:[[File:Lionhead rabbit Dobby.jpg|frameless|x50px|alt=Rabbit indicating done]] — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 03:41, 11 July 2025 (UTC)
:Oh actually it turns out I'm the most recent contributor to that template 🫠 I added a parameter two months ago and forgot all about it. Anyway though [[User:Folly Mox|Folly Mox]] ([[User talk:Folly Mox|talk]]) 17:01, 19 October 2024 (UTC)
::Thank you! I'll be back in a long while once I'm done with the lagomorphs, since by that point I'll be using Volume 7 for the rodents. -- [[User:Reconrabbit|<span style="color:#4E8321">Recon</span>]][[User talk:Reconrabbit|<span class="skin-invert" style="color:#073131">rabbit</span>]] 12:02, 11 July 2025 (UTC)
== Template:Efloras and Template:BONAP ==
Sure, {{done}}. [[User:Renata3|Renata]]•[[User talk:Renata3|3]] 00:41, 20 October 2024 (UTC)
The [[:Template:Efloras|first template]] is sort of whitelisted, but it isn't working correctly. There are 4 lines dedicated to it in the whitelist variable, but this template handles citations to a number of floras published on efloras.org. The most-cited are ''Flora of North America'' and ''Flora of China'', published in many volumes with different authors and dates for each. It seems like it needs an entry in wrapper_templates to get it working properly. The [[:Template:BONAP|second template]] is simpler; it should always produce 'CITEREFKartesz2014'. (In theory the year could change in the future but it should be stable in practice.) [[User:Choess|Choess]] ([[User talk:Choess|talk]]) 20:14, 12 July 2025 (UTC)
== Making whitelisting simpler and more efficient ==
:And as long as I'm requesting whitelisting of botany wrapper templates, [[:Template:Jepson eFlora]] can also take many different authors and will probably need to be handled in wrapper_templates. [[User:Choess|Choess]] ([[User talk:Choess|talk]]) 21:30, 12 July 2025 (UTC)
::{{ping|Choess}} I fixed {{tl|BONAP}}, but when I search for [https://petscan.wmcloud.org/?psid=38011880 harv errors] caused either by {{tl|Efloras}} or {{tl|Jepson eFlora}}, I find no errors caused by either template <s>(the one error returned by PetScan is caused by other templates)</s>. Is there a particular article you are concerned about? — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 01:59, 20 August 2025 (UTC)
== Pair skating ==
In the sandbox, I simplified and accelerated the whitelisting code. To remind everyone: wrapper templates can fail the "does footnote target exist" check in the main module at line 36.
Hello,
My changes (in [[Module:Footnotes/sandbox]], [[Module:Footnotes/whitelist/sandbox]], [[Module:Footnotes/anchor_id_list/sandbox]]):
# I made the whitelisting process only have two alternatives: either an explicit check on the anchor id, or a Lua pattern check on the anchor id (conditional on the corresponding wrapper template being in the article)
# I made the Lua pattern check much more efficient
#* Upon loading the pages, [[Module:Footnotes/anchor_id_list]] computes an intersection between all templates on the page and all wrapper templates that require Lua pattern check
#* This intersection is likely empty for the large majority of articles: no per-anchor overhead will be incurred on those articles.
#* When the intersection is non-empty, each anchor id is scanned only for those patterns that are relevant for wrapper templates actually used on the page. This minimizes pattern matching overhead.
# [[Module:Footnotes/whitelist]] had data structures for doing per-volume whitelisting. As far a I could tell, that was not being used anywhere. I converted all of that checking to either per-anchor-id whitelisting or Lua pattern whitelisting. This should reduce the number of false positives in [[:Category:Harv and Sfn no-target errors]].
I keep getting false positive errors for a source in [[Pair skating]]. It's for just one source, even though the code looks exactly like other sources that use the snfp template.
I'm hoping some other editor(s) will look at my changes before I check them into the main Module. The tests at [[Module:Footnotes/testcases]] mostly pass. As far as I can tell, even before my changes, the <code>test_sfn</code> tests were all marked as failing: I manually checked them and they seem fine now. I suspect it's because of UNIQ string mismatch.
Looks like this: [[Pair skating#CITEREFKestnbaum2003|Kestnbaum (2003)]], p. 218. sfnp error: multiple targets (2×): CITEREFKestnbaum2003 ([[:Category:Harv and Sfn template errors|help]]) Harv error: CITEREFKestnbaum2003 has multiple targets (2×).
{{pinging|Trappist the monk}} who wrote a lot of this code.
ThanksHopefully, insomeone advancewill forassist. anyI've commentstried orto suggestionsresolve the problem myself, but so far have been unsuccessful. It's very frustrating! — [[User:Hike395Figureskatingfan|hike395Christine (Figureskatingfan)]] ([[User talk:Hike395Figureskatingfan|talk]]) 1700:3534, 2817 NovemberAugust 20242025 (UTC)
:You might want to replace [[Special:Permalink/1306289786#cite_note-94|ref 86 (permalink)]] with an appropriate {{tlx|sfnp}} template because Kestnbaum 2003 is also listed under [[Special:Permalink/1306289786#Works cited|§Works cited (permalink)]].
:What I wrote was likely junk because it was a response to immediate needs of the community so it's good that you've improved and simplified. I'm not going to expend any effort trying to figure out what you've done. If it works, great; if it doesn't, you broke it, you fix it. You might want to make sure that [[Module:Footnotes/whitelist/sort]] will still work correctly after you implement your changes.
:—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 1800:3646, 2817 NovemberAugust 20242025 (UTC)
::I@[[User:Trappist acceptthe "youmonk|Trappist brokethe itmonk]], youthat fixdid it".! It was a simple solution all along, I willguess checkI [[Module:Footnotes/whitelist/sort]]just needed a second pair of eyes to see it. Thanks so much, especially for theyour feedbackquick response. You're a gem! — [[User:Hike395Figureskatingfan|hike395Christine (Figureskatingfan)]] ([[User talk:Hike395Figureskatingfan|talk]]) 1804:4345, 2817 NovemberAugust 20242025 (UTC)
:::Later:
:::* I made some end-to-end tests of [[Module:Footnotes/sandbox]] at [[Template:Sfnp/test 1]] and [[Template:Sfnp/test 2]]. The module appears to work in real situations.
:::* <s>To simplify the system, I'm assuming that using wrapper templates will not generate incorrect refs. That is, a wrapper template should know its own target id. There should be no need to generate an anchor id with that target id: it should never be "no target".</s>
:::I will wait 2 more days before I move sandbox over to main, in case someone notices something or objects. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 23:14, 29 November 2024 (UTC)
::::The clock is ticking?
::::
::::First bullet point. To know if the new module is actually working, I would expect to see {{color|#d33|no target}} and {{color|#d33|multiple target}} error messages; prove that what was working still works. There are none because the test pages are in the template namespace. I don't remember why that constraint was added; perhaps it was discussed on an associated talk page.
::::
::::Second bullet point makes no sense to me. What is it that you are really saying? Examples?
::::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 00:30, 30 November 2024 (UTC)
:::::# <s>If you look at line 92 of [[Module:Footnotes/sandbox]], I added logging of the "no target" errors, independent of namespace. The log is placed at the bottom of the HTML output, so you can check to see whether target_check is working. For [[Template:Sfnp/test 1]], the module correctly does not produce any "no target" errors. For [[Template:Sfnp/test 2]], the module correctly produces a single "no target" error. I can add a third test for "multiple target" errors (my changes shouldn't have affected that).</s> Oh, shoot. I see what Trappist is saying. The code for target_check is suppressed for namespace=10 (Template). I will fix.
:::::#*Later -- moved the tests to the Template talk namespace (leaving behind redirects), so the tests will work now. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 17:48, 30 November 2024 (UTC)
:::::# I don't think I explained it at all well. First, let me define some terms for clarity, to make sure we are understanding each other.
:::::#* Let's call a "reference" a list item produced by, e.g., {{tl|cite web}} that shows up in, e.g., a References section. Such references can have ids (generated by, e.g., {{para|ref}}) to be pointed to.
:::::#*Let's call a "footnote" an item produced by, e.g., {{tl|sfn}} or {{tl|harvnb}}, that shows up in, e.g., a Notes section. These footnotes each point to a reference by hyperlinking to the reference id.
:::::#*A "no target" error is when a footnote has an id which does not correspond to a reference id.
:::::#*IIUC, A list of reference ids is generated by [[Module:Footnotes/anchor id list]] by scraping the article contents and storing them in <code>article_whitelist</code>
:::::#*IIUC, A list of footnote ids is generated by the core function in lines 198-209 of [[Module:Footnotes/sandbox]]
:::::#*A problem occurs when there is a wrapper template, because the reference ids generated by those is non-obvious.
:::::#*To remedy the problem, the sandbox code checks the following:
:::::#**At lines 74-82 of [[Module:Footnotes/sandbox]], the footnote id is checked against a whitelist of footnote ids: if a corresponding template is used in the article, then we assume that the template generated the footnote id, and no error is thrown. (This is the same as the live code).
:::::#**At lines 84-88 of [[Module:Footnotes/sandbox]], the footnote id is checked against one or more Lua patterns (which get populated at lines 805-821 of [[Module:Footnotes/anchor id list]], if certain templates are used in the article. If the footnote id matches the Lua pattern, it does not throw an error.
:::::#*<s>What I was trying to say above is that we (usually) do not need to populate <code>article_whitelist</code> with reference ids generated by wrapper templates. The checking for wrapper templates should be completely handled by lines 74-88 (as described above) and does not require an entry in <code>article_whitelist</code></s>
:::::#*<s>The only case where <code>article_whitelist</code> must be populated is if the reference id is generated explicitly by the call to the wrapper template, e.g., if {{para|ref}} is set.</s>
:::::#*<s>Assuming that this reasoning is correct, I simplified the logic of anchor_id_make_wrapper() in [[Module:Footnotes/anchor id list/sandbox]] at line 502: when {{para|ref}} for a wrapper template is missing or "harv", don't generate a reference id to place into <code>article_whitelist</code>.</s>
:::::#We can wait longer than 2 days if Trappist (or anyone else) wants to take a closer look at the edits. Hope this helps! — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 08:16, 30 November 2024 (UTC)
{{od|5}} I am going to promote sandbox to main now. I will watch the following categories:
*{{clc|Pages with script errors}} (currently 445, not expecting an increase)
*{{clc|Harv and Sfn no-target errors}} (currently 4,767, expecting a modest decrease from eliminating false positives)
*{{clc|Harv and Sfn multiple-target errors}} (currently 1, not expecting an increase).
If anyone sees anything odd, please ping me and I (other other templateeditors/admins) can revert. Thanks in advance! — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 22:29, 1 December 2024 (UTC)
:I saw that {{tl|EB1911}} (along with other templates) did require parsing to generate the correct reference id, so I restored that code to [[Module:Footnotes/anchor id list]]. Now there is redundant checking for template wrapping, I moved {{tl|Cite bryonames}}, {{tl|Cite NatureServe}}, and {{tl|PLANTS}} out of the Lua pattern checking and turned them into wrapper templates (whose reference id is inferred). Everything should work now. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 06:29, 2 December 2024 (UTC)
== Yet another Tolkien to whitelist ==
== Spanish Civil War ==
['CITEREFTolkien2024'] = template_names['ME-ref']
Any ideas what's causing [[:Category:Harv and Sfn no-target errors]] to be shown in [[Spanish Civil War]] {{oldid2|1263602923}}? No "no target errors" are showing with the Trappist script. <span style="background:#F3F3F3; color:inherit; padding:3px 9px 4px">[[User talk:Czar|<span style='font:bold small-caps 1.2em sans-serif;color:#871E8D'>czar</span>]]</span> 16:23, 17 December 2024 (UTC)
Thanks,
:[https://en.wikipedia.org/w/index.php?title=Spanish_Civil_War&diff=prev&oldid=1263603780 Found it]. It would be helpful if there was a series of steps added to that category so others know what to look for when performing category cleanup. Alternatively, {{ping|Trappist the monk|p=}}, can you add this error to your script? <span style="background:#F3F3F3; color:inherit; padding:3px 9px 4px">[[User talk:Czar|<span style='font:bold small-caps 1.2em sans-serif;color:#871E8D'>czar</span>]]</span> 16:30, 17 December 2024 (UTC)
[[User:Andy02124|Andy02124]] ([[User talk:Andy02124|talk]]) 18:25, 19 August 2025 (UTC)
:
:This is about the malformed template: <syntaxhighlight lang="wikitext" inline="1">{{Harvsp|texte=Beevor, 2008|id=Beevor2008|p=258}}</syntaxhighlight> at [[Special:Permalink/1263602923#cite_note-181|ref note 175 (permalink)]]. I see an error message there. Do you not see that message?
:{{Done}} — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 01:51, 20 August 2025 (UTC)
:
:Because {{para|texte}} and {{para|id}} parameters are not known to [[Module:Footnotes]], they are ignored. Because they are ignored, Module:Footnotes creates an empty <code>CITEREF</code> wikilink:
::<syntaxhighlight lang="wikitext" inline="1">[[#CITEREF|]]</syntaxhighlight> → [[#CITEREF|]]
:Because the wikilink is empty, MediaWiki does not create an {{tag|a|attribs=href="CITEREF..."}} html link.
:
:[[User:Trappist_the_monk/HarvErrors.js]] works in the html ___domain looking for {{tag|a|attribs=href="CITEREF..."|o}} tags. Because MediaWiki does not create html tags for malformed wikilinks, ~/HarvErrors.js does not see this sort of error. That the error is caught by Module:Footnotes is, I think, sufficient.
:—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 17:09, 17 December 2024 (UTC)
::No, no error shows for me on ref note 175 on that permalink. In the HTML, I see the class="error harv-error" that should show but it is set as "display: none". I don't see anything in my common.css that would conflict either. Thank you <span style="background:#F3F3F3; color:inherit; padding:3px 9px 4px">[[User talk:Czar|<span style='font:bold small-caps 1.2em sans-serif;color:#871E8D'>czar</span>]]</span> 18:07, 17 December 2024 (UTC)
:::Ah, right, that message is normally hidden (still – we could probably change that now that there are only 5k-ish articles in the category). It is what is {{em|not}} in your [[Special:MyPage/common.css|common.css]] page; add this:
::::{{code|lang=css|.harv-error {display: inline !important;} /* display Module:Footnotes errors */}}
:::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 18:42, 17 December 2024 (UTC)
::::Thanks. Yes, is it possible to unhide that for everyone? Perhaps in the script? Otherwise pretty hard to spot. <span style="background:#F3F3F3; color:inherit; padding:3px 9px 4px">[[User talk:Czar|<span style='font:bold small-caps 1.2em sans-serif;color:#871E8D'>czar</span>]]</span> 01:26, 18 December 2024 (UTC)
:::::I thought that I explained that [[User:Trappist_the_monk/HarvErrors.js]] is not able to detect this particular (malformed wikilink) error.
:::::
:::::Yep, hidden error messaging is easy to unhide. In 2020, when [[Module:Footnotes]] first began emitting error messages, there were some 47,000+ articles with harv errors and no real mechanism to deal with false positive errors. That has been remedied to some extent ([[Module:Footnotes/whitelist]], {{tlx|sfn whitelist}}, and {{para|ignore-err}}).
:::::
:::::For a while there were a few editors who were actively working to reduce the number of articles listed in {{cl|Harv and Sfn no-target errors}}. Their interest seems to have waned.
:::::
:::::I have always been an advocate of visible error messaging because when editors don't know that the error exists, they won't fix it – of course, they are just as likely to ignore existing errors that they know about... That seems to have worked for {{cl|Harv and Sfn multiple-target errors}} which has stayed mostly empty since that error messaging was unhidden in April 2021.
:::::
:::::If there is some sort of consensus to unhide, we can unhide.
:::::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 15:02, 18 December 2024 (UTC)
|