Jump to content

Module talk:Citation/CS1/Archive 11

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by ClueBot III (talk | contribs) at 15:06, 5 December 2014 (Archiving 1 discussion from Module talk:Citation/CS1. (BOT)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Archive 5Archive 9Archive 10Archive 11Archive 12

http/ftp etc

Maybe there should be included some check in |url=, if it starts with http/ftp etc.? Because if there is |url=www.example.com or |url=example.com, the link won't be clickable. --Edgars2007 (talk/contribs) 18:01, 25 September 2014 (UTC)

There is. See Help:CS1_errors#Check_.7Curl.3D_scheme. This error message isn't hidden so you should see it. Here is a very simple {{cite web}}:
{{cite web |url=www.example.com}} [www.example.com www.example.com]. {{cite web}}: Check |url= value (help); Missing or empty |title= (help)
Do you not see the error messages? (there are two, one for the malformed url and the other for a missing title)
Trappist the monk (talk) 18:13, 25 September 2014 (UTC)
Oh, sorry. Didn't though to test it :) --Edgars2007 (talk/contribs) 21:08, 25 September 2014 (UTC)

COinS safe

I updated {{COinS safe}} to add Category:Templates not safe for use in citation templates. Is it worth doing a check for any of these templates? --  Gadget850 talk 20:13, 25 September 2014 (UTC)

I'm not sure I understand what it is that you're asking. By the time the module gets to the content of a citation's various parameters, any templates will have already been expanded. So, all the module sees is all of the template cruft intermingled with the important stuff that CS1 wants.
If you mean should someone run an AWB script of some-such that would strip citations of these particular templates, then, yeah, someone should. I have it in mind to do that for {{nihongo}} and {{asiantitle}} after the initial implementation of |script-title= so that editors who work on Asian topics can see the results, and we'll get cleaner COinS.
Trappist the monk (talk) 21:22, 25 September 2014 (UTC)
That is what I meant. --  Gadget850 talk 22:37, 25 September 2014 (UTC)
@Gadget850: Thanks for the info. Some questions/comments:
  1. Should the category documentation state that {{COinS safe}} should be added to the template documentation to add the category?
  2. Should redirects such as {{aut}} and {{sm}} (both redirect to {{smallcaps}}) also be included in the category?
  3. Members of Wikipedia:WikiProject Mesoamerica commonly use {{aut}} in citations (see Wikipedia:WikiProject Mesoamerica/Citations). You might want to talk with them before mass-removing {{aut}}.
  4. Should documentation pages such as Template:Abbr/doc be excluded from the category?
  5. Should sandbox pages such as Template:Abbr/sandbox be excluded from the category?
  6. I just added {{COinS safe|n}} to {{date}} and {{dts}}.
  7. BattyBot aready removes {{date}}, {{dts}}, {{nowrap}} and {{start date}} from citation date fields to remove articles from Category:CS1 errors: dates. If there are variations that BattyBot isn't removing or additional templates it could remove, please let me know.
Thanks! GoingBatty (talk) 00:48, 26 September 2014 (UTC)
Re {{aut}}, you can find quite a few of them in the remaining articles in the deprecated parameters category, since Monkbot is not programmed to fix |coauthors= when templates are present in citations, as far as I know.
Re {{date}} and its ilk, the following appear to be redirects to those four templates: {{Css1date}}, {{Cssdate}}, {{Date start}}, {{Datesort}}, {{DATEtoMOS}}, {{FormatDate}}, {{Foundation date}}, {{Initial release}}, {{ISOtodmymdy}}, {{ISOtoMOS}}, {{J}}, {{Launch date}}, {{No break}}, {{No wrap}}, {{Nobr}}, {{Nobreak}}, {{Release date}}, {{Sbd}}, {{Sortdate}}, {{SortDate}}, {{Start Date}}, {{Startdate}}, and {{Starting date}}. – Jonesey95 (talk) 03:49, 26 September 2014 (UTC)
@Jonesey95: Closer inspection of the code showed that BattyBot already removed {{Nobreak}} and {{Startdate}} as well. It now also removes {{Nobr}}, {{No break}}, {{No wrap}}, and {{Start Date}} (although there weren't any CS1 date errors due to these templates). If anyone has examples of the other templates in use in CS1 citations, I'll add them too. Thanks! GoingBatty (talk) 23:54, 26 September 2014 (UTC)
@Jonesey95: {{nbsp}} is another redirect that could be in the category too. BattyBot is now removing it from templates. GoingBatty (talk) 02:53, 27 September 2014 (UTC)
I found an instance of {{nobreak}} causing a citation error in Krkonose / Karkonosze and another in Nazi crimes against the Polish nation. I used catscan to search the date category for all of the above templates, and that's all I found. – Jonesey95 (talk) 04:28, 27 September 2014 (UTC)
@Jonesey95: BattyBot didn't fix those articles because {{nobreak}} was also being used in an earlier parameter, so I fixed them manually. Thanks! GoingBatty (talk) 21:04, 27 September 2014 (UTC)
GoingBatty, {{dts}} was left in Compiz after Battybot visited. I don't see other templates in the citations in question. There is another one in PCSX-ReloadedJonesey95 (talk) 04:20, 27 September 2014 (UTC)
@Jonesey95:  Done - thanks! GoingBatty (talk) 21:04, 27 September 2014 (UTC)

Where does this break come from?

A few months ago, {{cite doi}} was deprecated. Today, it looks like some edit enforced that deprecation by breaking the connection from {{sfn}} using an individual {cite doi} template. But without article cleanup (by a bot, I expect), {sfn} now produces an error (see helium). I do not know which page was edited into this break. Anyone an idea? (With that knowledge, I'll ask a revert on the right talkpage). -DePiep (talk) 09:26, 13 October 2014 (UTC)

Do you mean this?

Markup
{{Cite journal|title = Probing the interior of fullerenes by <sup>3</sup>He NMR spectroscopy of endohedral <sup>3</sup>He@C<sub>60</sub> and <sup>3</sup>He@C<sub>70</sub> |author = Saunders, M. ''et al.''|journal = Nature |volume = 367|issue = 6460|pages = 256–258 |year = 1994 |doi = 10.1038/367256a0|bibcode = 1994Natur.367..256S|first2 = Hugo A.|first3 = R. James|first4 = Stanley|first5 = Darón I.|first6 = Frank A. L. }}
Renders as
Saunders, M.; et al. (1994). "Probing the interior of fullerenes by 3He NMR spectroscopy of endohedral 3He@C60 and 3He@C70". Nature. 367 (6460): 256–258. Bibcode:1994Natur.367..256S. doi:10.1038/367256a0. {{cite journal}}: |first2= missing |last2= (help); |first3= missing |last3= (help); |first4= missing |last4= (help); |first5= missing |last5= (help); |first6= missing |last6= (help); Explicit use of et al. in: |author= (help)

If so, the error is because the last name fields are missing. --  Gadget850 talk 10:31, 13 October 2014 (UTC)

Yes, these names are missing, producing error texts (helium now has four such references). The point is, a week ago they were not. The names were not deleted, but somehow a connection was removed ( Mirokado noted this). I don't know if the breaking edit was done in citation/CS1 or elsewhere. If a "bug removal" in /CS1 is the cause, I'd say that removal failed and should be revisited. But it could also be caused by another edit, someone enforcing the {{cite doi}} deprecation . -DePiep (talk) 12:02, 13 October 2014 (UTC)
Helium doesn't use {{sfn}} --Redrose64 (talk) 12:26, 13 October 2014 (UTC)
So we can rule out {{sfn}} then. See below for the gadget850 explanation. -DePiep (talk) 13:20, 13 October 2014 (UTC)
I was trying to figure that out as well.
Author detection was fixed in the last update. The citation listed above has |first= without |last= which is certainly not proper. As I see it, this error is proper.
Elsewhere has been discussed the breaking of the "citation trick". See Wikipedia talk:WikiProject Elements#The citation trick has stopped working. --  Gadget850 talk 12:44, 13 October 2014 (UTC)
The template is correct to flag these errors in Helium. I've just fixed a couple. Aa77zz (talk) 12:49, 13 October 2014 (UTC)
re Aa77zz: nice, but they were mass-created, and I don't want to be forced to manually edit this way. Problem is so far nobody knows where the bad edit was made. -DePiep (talk) 13:05, 13 October 2014 (UTC)
re Gadget850 "... the error is proper": Could be, but I'd like to know where the mass-creating stems from. -DePiep (talk) 13:08, 13 October 2014 (UTC)
If, by "mass-creating", you mean that many citations have lists of first names with no corresponding last names, Citation Bot created many citations like that; it was a bug that was eventually fixed. Running Citation Bot on the page again may add the last names. You will want to inspect the resulting edit, however; Citation Bot is a useful tool, but it is never free of bugs. – Jonesey95 (talk) 05:41, 14 October 2014 (UTC)
The bot action you propose still involves manual editing. I think all 17000 {cite doi} transclusions are suspected, and that would be too much for manual check.
I meant to say it was "mass-created" by one single recent edit (exposing old edits at once being 'wrong'; likely and edit in /CS1 as we know by now). When I asked for a bot cleanup, I was thinking of a new bot task, running once, that cleans this up. However, I don't know whether this is feasible, I have lost the topic after the code discussion below. Also, the code discussion below could produce another solution, making a bot action unneeded. So bots can wait till that option is fleshed out. -DePiep (talk) 07:24, 14 October 2014 (UTC)

(copied useful Gadget850 post from WT:ELEMENTS):

  • The citation hack consists of stuffing {{cite doi}} into the |title= parameter of {{citation}} and adding markup to undo the italic markup. Currently the apostrophes are added to the title in the COinS metadata.
  • Module:Citation/CS1 was updated to prevent apostrophe markup from being passed into the COinS metadata. A bug was found and this update was reverted.
  • And the change to Fluorine is a real hack. Lets come up with a better solution before proliferatiing this. --  Gadget850 talk 12:36, 13 October 2014 (UTC) (copy/pasted here -DePiep (talk) 13:15, 13 October 2014 (UTC))
If this explains it, I think we better ask a bot to get author names from {cite doi/xxx} into the straight {cite} parameters (in article page that is). {{cite doi}} has 17000+ transclusions. -DePiep (talk) 13:24, 13 October 2014 (UTC)
Those first names without last names were added by our old friend CitationBot.[1] --  Gadget850 talk 13:29, 13 October 2014 (UTC)
The "real hack" used by Mirokado in this edit was the right idea but the wrong method. The old code was e.g.
{{citation|title=''{{cite doi|10.1039/c0em00373e|noedit}}''|ref={{harvid|Ahrens|2011}}}}
and this was altered to
<span id="{{harvid|Ahrens|2011}}" class="citation">{{cite doi|10.1039/c0em00373e|noedit}}</span>
but by using {{wikicite}} it could have been simpler:
{{wikicite|reference={{cite doi|10.1039/c0em00373e|noedit}} |ref={{harvid|Ahrens|2011}}}}
It is never a good idea to misuse templates, but this is the primary purpose of {{wikicite}}. --Redrose64 (talk) 14:26, 13 October 2014 (UTC)

It is wrongheaded to think that the citation hack ever worked as this citation from Fluorine shows:

  • {{citation/new|title=''{{cite doi|10.1039/c0em00373e|noedit}}''|ref={{harvid|Ahrens|2011}}}}
    • Attention: This template ({{cite doi}}) is deprecated. To cite the publication identified by doi:10.1039/c0em00373e, please use {{cite journal}} (if it was published in a bona fide academic journal, otherwise {{cite report}} with |doi=10.1039/c0em00373e instead.
      • '"`UNIQ--templatestyles-00000014-QINU`"'<cite id="CITEREFAhrens2011" class="citation cs2">''<span></span>''<span class="error">Attention: This template (<span class="nowrap">&#123;&#123;</span>[[Template:cite doi|cite doi]]<span class="nowrap">&#125;&#125;</span>) is deprecated. To cite the publication identified by doi:10.1039/c0em00373e, please use <span class="nowrap">&#123;&#123;</span>[[Template:cite journal|cite journal]]<span class="nowrap">&#125;&#125;</span> (if it was published in a bona fide academic journal, otherwise <span class="nowrap">&#123;&#123;</span>[[Template:cite report|cite report]]<span class="nowrap">&#125;&#125;</span> with <code class="tpl-para" style="word-break:break-word; ">&#124;doi&#61;10.1039/c0em00373e</code> instead.</span>''<span></span>''</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=%3Cspan+class%3D%22error%22%3EAttention%3A+This+template+%28%3Cspan+class%3D%22nowrap%22%3E%26%23123%3B%26%23123%3B%3C%2Fspan%3Ecite+doi%3Cspan+class%3D%22nowrap%22%3E%26%23125%3B%26%23125%3B%3C%2Fspan%3E%29+is+deprecated.+To+cite+the+publication+identified+by+doi%3A10.1039%2Fc0em00373e%2C+please+use+%3Cspan+class%3D%22nowrap%22%3E%26%23123%3B%26%23123%3B%3C%2Fspan%3Ecite+journal%3Cspan+class%3D%22nowrap%22%3E%26%23125%3B%26%23125%3B%3C%2Fspan%3E+%28if+it+was+published+in+a+bona+fide+academic+journal%2C+otherwise+%3Cspan+class%3D%22nowrap%22%3E%26%23123%3B%26%23123%3B%3C%2Fspan%3Ecite+report%3Cspan+class%3D%22nowrap%22%3E%26%23125%3B%26%23125%3B%3C%2Fspan%3E+with+%3Ccode+class%3D%22tpl-para%22+style%3D%22word-break%3Abreak-word%3B+%22%3E%26%23124%3Bdoi%26%2361%3B10.1039%2Fc0em00373e%3C%2Fcode%3E+instead.%3C%2Fspan%3E&rfr_id=info%3Asid%2Fen.wikipedia.org%3AModule+talk%3ACitation%2FCS1%2FArchive+11" class="Z3988"></span>

There are two copies of the citation's metadata in that mass of stuff.

This form from Editor Mirokado is better because it produces only one copy of the metadata, but is more difficult to type:

  • <span id="{{harvid|Ahrens|2011}}" class="citation">{{cite doi|10.1039/c0em00373e|noedit}}</span>
    • Attention: This template ({{cite doi}}) is deprecated. To cite the publication identified by doi:10.1039/c0em00373e, please use {{cite journal}} (if it was published in a bona fide academic journal, otherwise {{cite report}} with |doi=10.1039/c0em00373e instead.
      • <span id="CITEREFAhrens2011" class="citation"><span class="error">Attention: This template (<span class="nowrap">&#123;&#123;</span>[[Template:cite doi|cite doi]]<span class="nowrap">&#125;&#125;</span>) is deprecated. To cite the publication identified by doi:10.1039/c0em00373e, please use <span class="nowrap">&#123;&#123;</span>[[Template:cite journal|cite journal]]<span class="nowrap">&#125;&#125;</span> (if it was published in a bona fide academic journal, otherwise <span class="nowrap">&#123;&#123;</span>[[Template:cite report|cite report]]<span class="nowrap">&#125;&#125;</span> with <code class="tpl-para" style="word-break:break-word; ">&#124;doi&#61;10.1039/c0em00373e</code> instead.</span></span>

This form from Editor Redrose64 is similar but adds an extra <span>...</span>:

  • {{wikicite|reference={{cite doi|10.1039/c0em00373e|noedit}} |ref={{harvid|Ahrens|2011}}}}
    • ‹See TfM›Attention: This template ({{cite doi}}) is deprecated. To cite the publication identified by doi:10.1039/c0em00373e, please use {{cite journal}} (if it was published in a bona fide academic journal, otherwise {{cite report}} with |doi=10.1039/c0em00373e instead.
      • '"`UNIQ--templatestyles-0000001D-QINU`"'<span class="noprint tfd tfd-dated tfd-tiny tfd-dedup">[[Wikipedia:Templates for discussion/Log/2025 May 21#Template:Wikicite|‹See TfM›]]</span>'"`UNIQ--templatestyles-0000001E-QINU`"'<cite class="citation wikicite" id=CITEREFAhrens2011><span class="error">Attention: This template (<span class="nowrap">&#123;&#123;</span>[[Template:cite doi|cite doi]]<span class="nowrap">&#125;&#125;</span>) is deprecated. To cite the publication identified by doi:10.1039/c0em00373e, please use <span class="nowrap">&#123;&#123;</span>[[Template:cite journal|cite journal]]<span class="nowrap">&#125;&#125;</span> (if it was published in a bona fide academic journal, otherwise <span class="nowrap">&#123;&#123;</span>[[Template:cite report|cite report]]<span class="nowrap">&#125;&#125;</span> with <code class="tpl-para" style="word-break:break-word; ">&#124;doi&#61;10.1039/c0em00373e</code> instead.</span></cite>

If this sort of hacking is necessary, choose either of the latter two. Don't use the first.

Trappist the monk (talk) 14:39, 13 October 2014 (UTC)

My suggestion adds an extra <span>...</span>, yes; but only compared to the original. When compared to Mirokado's technique, it's the same number of spans. The only technical difference is that one has the wikicite class, the other doesn't. --Redrose64 (talk) 15:20, 13 October 2014 (UTC)

Titles in CoinS data for books

For books, the template places the book title in rft.atitle and the chapter title in rft.btitle, which seems the wrong way round.[2] Kanguole 14:20, 5 November 2014 (UTC)

I think you're right, it has been wrong forever. Thanks for that. Fixed in the sandbox.
'"`UNIQ--templatestyles-00000020-QINU`"'<cite class="citation book cs1">"Chapter". ''Title''.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=Chapter&rft.btitle=Title&rfr_id=info%3Asid%2Fen.wikipedia.org%3AModule+talk%3ACitation%2FCS1%2FArchive+11" class="Z3988"></span>
Trappist the monk (talk) 14:32, 5 November 2014 (UTC)