Module talk:Footnotes/Archive 3
| This is an archive of past discussions about Module:Footnotes. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
| Archive 1 | Archive 2 | Archive 3 |
Big ole whitelist request
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.
@Renata3: can you add (*deep breath*):
['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'}
Thanks in advance and sorry. (Noting for clarity that "TwitchettMote1998" alongside "MoteTwitchett1998" is not an error) Folly Mox (talk) 14:58, 19 October 2024 (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 Folly Mox (talk) 17:01, 19 October 2024 (UTC)
Sure,
Done. Renata•3 00:41, 20 October 2024 (UTC)
- Oh my gosh I'm so stupid! I actually went to cite one of the two relevant volumes today, and it turns out both the CITEREFs I specifically called out as
not errors
are errors. I must have fatfingered 1998 for 1988 and copypasted it three times without double checking the publication information.I feel like I heard there is a new process for the whitelist, but now I'm requesting an alteration rather than an addition, so I don't know if anyone other than Renata3 can perform it. Can 'CITEREFTwitchettMote1998' be changed to 'CITEREFTwitchettMote1988' and 'CITEREFMoteTwitchett1998' changed to 'CITEREFMoteTwitchett1988'? The relevant books are doi:10.1017/CHOL9780521243339 and doi:10.1017/CHOL9780521243322, in case anyone understandably wants to check my work.Sorry again. Folly Mox (talk) 14:41, 25 January 2025 (UTC)
Done. It's an easy edit of Module:Footnotes/whitelist which can be done by any template editor. — hike395 (talk) 15:24, 25 January 2025 (UTC)
- Thank you, hike395! (a road I've not exactly hiked from, but definitely camped near)In Special:Diff/1271758480 I undid the manual
|ref=I added to counteract the previously incorrect whitelist CITEREFs, but my {{harvc}}s are still throwing no target errors. Are you able to tell what I'm doing wrong? Folly Mox (talk) 15:34, 25 January 2025 (UTC)- You've done nothing wrong: there's some other problem. I'm investigating. (Camping on the Sierra side of US395 can be delightful, also; some people like the solitude of the Great Basin, though). — hike395 (talk) 16:20, 25 January 2025 (UTC)
- @Folly Mox: The problem is in Module:Harvc. It doesn't use the whitelist/wrapper mechanism in this module. For now, I would set
|ignore_err=yesin {{Harvc}} to suppress the spurious errors. I'll think about whether we can use the mechanism here over there. — hike395 (talk) 18:36, 25 January 2025 (UTC)- Huh! Ok, thank you so much for identifying the issue! Using {{harvc}} was a pretty big reason I wanted to whitelist the Cambridge History of China CITEREFs above (duplicating all that bibliographic information for each chapter is pretty bloaty), and I feel like it used to work?Anyway, thanks again and I'll just hide the errors, like when the building inspector comes round. Folly Mox (talk) 19:17, 25 January 2025 (UTC)
I feel like it used to work?
It did used to work. I guess I gotta wonder if all of this churn was a good idea.- —Trappist the monk (talk) 19:26, 25 January 2025 (UTC)
- @Trappist the monk: I'm not sure how {{harvc}} could have used the whitelist? Take a look at target_check() at line 21 in Module:Harvc (which is called from {{harvc}}). It is completely separate code from target_check() in Module:Footnotes: the comment in that function explicitly says that it does not work with wrapped templates. If I'm misunderstanding something, please let me know.
- Fortunately, the two functions are similar enough where we can call the Module:Footnotes target_check() from Module:Harvc. I have a version of this working in Module:Harvc/sandbox, but just puzzling out how to test it. Advice is welcome. — hike395 (talk) 19:40, 25 January 2025 (UTC)
- You may be correct; I would have expected that it looked in Module:Footnotes/whitelist but apparently it doesn't do that but only looks at locally constructed anchor ids. If you have a fix, apply it.
- —Trappist the monk (talk) 20:46, 25 January 2025 (UTC)
- Oops, I just asked for comments over at Template talk:Harvc#Adding whitelist/wrapper template handling to this template, not having seen your comment here. Not sure if anyone else will respond. Is it ok to wait a day or two? — hike395 (talk) 21:32, 25 January 2025 (UTC)
- Posting here because it's the tab that spawned when I closed the last one, with the acknowledgement of the ping to the other discussion.I'm also favouring an immediate implementation; if new errors arise as a consequence, a rollback is easy, and no one is likely to weigh in against an update pitched as a pure bugfix. Folly Mox (talk) 15:29, 26 January 2025 (UTC)
- Oops, I just asked for comments over at Template talk:Harvc#Adding whitelist/wrapper template handling to this template, not having seen your comment here. Not sure if anyone else will respond. Is it ok to wait a day or two? — hike395 (talk) 21:32, 25 January 2025 (UTC)
- Huh! Ok, thank you so much for identifying the issue! Using {{harvc}} was a pretty big reason I wanted to whitelist the Cambridge History of China CITEREFs above (duplicating all that bibliographic information for each chapter is pretty bloaty), and I feel like it used to work?Anyway, thanks again and I'll just hide the errors, like when the building inspector comes round. Folly Mox (talk) 19:17, 25 January 2025 (UTC)
- @Folly Mox: The problem is in Module:Harvc. It doesn't use the whitelist/wrapper mechanism in this module. For now, I would set
- You've done nothing wrong: there's some other problem. I'm investigating. (Camping on the Sierra side of US395 can be delightful, also; some people like the solitude of the Great Basin, though). — hike395 (talk) 16:20, 25 January 2025 (UTC)
- Thank you, hike395! (a road I've not exactly hiked from, but definitely camped near)In Special:Diff/1271758480 I undid the manual
Implemented Please let me know if you see anything odd. — hike395 (talk) 16:14, 26 January 2025 (UTC)
Push to clear the last few ones.
See Wikipedia:Bot requests#Help clear Category:Harv and Sfn no-target errors.
"n.d.a" vs. "n.d. a"
At Capri-Sun, I have two references that I'd written as {{harvnb|Capri Sun Group|n.d. a}} and {{harvnb|Capri Sun Group|n.d. b}}. 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 Group & n.d. a" and ""Capri Sun Group & n.d. b", which appears to be because 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 ? before the %l on lines 65, 66, 131, and 132. -- Tamzin[cetacean needed] (they|xe|🤷) 03:06, 7 April 2025 (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 -- LCU ActivelyDisinterested «@» °∆t° 11:12, 7 April 2025 (UTC)
- @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 -- Tamzin[cetacean needed] (they|xe|🤷) 14:27, 7 April 2025 (UTC)
- Capri Sun Group n.d.a
- Capri Sun Group n.d.b
- Capri Sun Group 1997a
- Without spaces ↑
- Capri Sun Group & n.d. a
- Capri Sun Group & n.d. b
- Capri Sun Group & 1997 a
- With spaces ↑ 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. -- Tamzin[cetacean needed] (they|xe|🤷) 15:01, 7 April 2025 (UTC)
- Sorry misconstrued the issue. -- LCU ActivelyDisinterested «@» °∆t° 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, Rjjiii (talk) 20:54, 7 April 2025 (UTC)
- @Tamzin & ActivelyDisinterested:
- APA uses n.d.-x. It seems like Chicago and Harvard referencing do as well. I've added the pattern for that to the sandbox module:
- Live
- Capri Sun Group & n.d.-a
- 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 Capri Sun Group n.d.a works):
- Capri Sun Group (n.d.). "Frequently Asked Questions". Capri-Sun.com.
- Capri Sun Group (n.d.a). "Frequently Asked Questions". Capri-Sun.com.
- Capri Sun Group (n.d. a). "Frequently Asked Questions". Capri-Sun.com.
{{citation}}: Check date values in:|date=(help) - Capri Sun Group (n.d.-a). "Frequently Asked Questions". Capri-Sun.com.
{{citation}}: Check date values in:|date=(help)
- Also some stats while thinking about changes:
- 5,041,630 pages with cite web
- 15,112 pages with cite web using n.d.
- 45 pages with cite web and n.d.a (without spaces)
- 55% of cite web invocations 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. 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" 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. Rjjiii (talk) 04:36, 21 April 2025 (UTC)
- Continued at: Help_talk:Citation_Style_1#"n.d.a",_"n.d._a",_or_"n.d.-a" Rjjiii (talk) 03:31, 12 April 2025 (UTC)
- Sorry misconstrued the issue. -- LCU ActivelyDisinterested «@» °∆t° 15:10, 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. -- Tamzin[cetacean needed] (they|xe|🤷) 15:01, 7 April 2025 (UTC)
- @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 -- Tamzin[cetacean needed] (they|xe|🤷) 14:27, 7 April 2025 (UTC)
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 - Shearonink (talk) 03:33, 9 July 2025 (UTC)
- It's a false positive, because {{Cite MW}} is a template that wraps {{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! — hike395 (talk) 07:19, 9 July 2025 (UTC)
- The Trappist script doesn’t flag false positives but the css modification (as described on the error page) does.
- 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... - Shearonink (talk) 15:14, 9 July 2025 (UTC)
Two additions
I use these templates pretty often and have had several issues that have led me here. Can the following be added to the whitelist: Template:Lagomorphs2018, Template:HMW2016 Volume 6 ['CITEREFSmithJohnstonAlvesHackländer2018'] = {'Lagomorphs2018'}
['CITEREFWilsonLacherMittermeier2016'] = {'HMW2016 Volume 6'} -- Reconrabbit 17:24, 10 July 2025 (UTC)
— hike395 (talk) 03:41, 11 July 2025 (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. -- Reconrabbit 12:02, 11 July 2025 (UTC)
Pair skating
Hello,
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.
Looks like this: Kestnbaum (2003), p. 218. sfnp error: multiple targets (2×): CITEREFKestnbaum2003 (help) Harv error: CITEREFKestnbaum2003 has multiple targets (2×).
Hopefully, someone will assist. I've tried to resolve the problem myself, but so far have been unsuccessful. It's very frustrating! Christine (Figureskatingfan) (talk) 00:34, 17 August 2025 (UTC)
- You might want to replace ref 86 (permalink) with an appropriate
{{sfnp}}template because Kestnbaum 2003 is also listed under §Works cited (permalink). - —Trappist the monk (talk) 00:46, 17 August 2025 (UTC)
- @Trappist the monk, that did it! It was a simple solution all along, I guess I just needed a second pair of eyes to see it. Thanks so much, especially for your quick response. You're a gem! Christine (Figureskatingfan) (talk) 04:45, 17 August 2025 (UTC)
Yet another Tolkien to whitelist
['CITEREFTolkien2024'] = template_names['ME-ref']
Thanks, Andy02124 (talk) 18:25, 19 August 2025 (UTC)
Done — hike395 (talk) 01:51, 20 August 2025 (UTC)
Template:Efloras and Template:BONAP
The 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 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.) Choess (talk) 20:14, 12 July 2025 (UTC)
- 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. Choess (talk) 21:30, 12 July 2025 (UTC)
- @Choess: I fixed {{BONAP}}, but when I search for harv errors caused either by {{Efloras}} or {{Jepson eFlora}}, I find no errors caused by either template
(the one error returned by PetScan is caused by other templates). Is there a particular article you are concerned about? — hike395 (talk) 01:59, 20 August 2025 (UTC)
- @Choess: I fixed {{BONAP}}, but when I search for harv errors caused either by {{Efloras}} or {{Jepson eFlora}}, I find no errors caused by either template
Module:Footnotes/anchor id list updates
@Hike395, are the changes in Module:Footnotes/anchor id list/sandbox ready to be merged into Module:Footnotes/anchor id list? I'd like to get the incompatibility with Module:Cite resolved so we can clean up articles that are exceeding the WP:PEIS limit. --Ahecht (TALK
PAGE) 14:23, 17 September 2025 (UTC)
- Looking at their comment on the last edit Template:Sfnp/test 2 is failing -- LCU ActivelyDisinterested «@» °∆t° 14:32, 17 September 2025 (UTC)
- The changes to anchor_id_list/sandbox do not appear to have broken test_2, although the test is indeed broken. I can investigate further, although not until next week. If it is urgent, we can temporarily revert the sandbox. — hike395 (talk) 11:20, 18 September 2025 (UTC)