Module talk:Footnotes
This is the talk page for discussing improvements to the Footnotes module. |
|
Archives: 1, 2Auto-archiving period: 6 months ![]() |
![]() | Module:Footnotes is permanently protected from editing because it is a heavily used or highly visible module. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit.
|
Big ole whitelist request
[edit]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=yes
in {{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.
[edit]See Wikipedia:Bot requests#Help clear Category:Harv and Sfn no-target errors.
Headbomb {t · c · p · b} 22:05, 25 January 2025 (UTC)
"n.d.a" vs. "n.d. a"
[edit]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)