Module talk:Citation/CS1
This page has archives. Sections older than 30 days may be automatically archived by ClueBot III when more than 6 sections are present. |
False error message on cite encyclopedia
There is a template called {{cite DNBIE}} that has been minding its own business for some years. It is a wrapper around {{cite encyclopedia}} until fairly recently it has not had any problems. However now it is reporting an error message in red:
Lee, Sidney, ed. (1903). "Required
|title=
missing". Index and Epitome. Dictionary of National Biography. Cambridge University Press.
The reason for this has nothing to do with the title line, but is because the encyclopedia parameter is:
| encyclopedia =[[Dictionary of National Biography]] [http://www.archive.org/stream/dictionaryofnati00leesuoft#page/n2/mode/1up Index and Epitome]
- | encyclopedia =Dictionary of National Biography Index and Epitome
Please fix the underlying code ASAP so that it does not report this error as linking in the encyclopedia link ought not to be discouraged in this way. -- PBS (talk) 23:29, 26 September 2015 (UTC)
- I have found a simple work around hack. If the lead string is a wiki link then the warning goes away (Simples!)
- So while this
| encyclopedia =[[Dictionary of National Biography]] [http://www.archive.org/stream/dictionaryofnati00leesuoft#page/n2/mode/1up Index and Epitome]
- gives an error. This does not:
| encyclopedia =[[w:Dictionary of National Biography|Dictionary of National Biography]] [http://www.archive.org/stream/dictionaryofnati00leesuoft#page/n2/mode/1up Index and Epitome]
- -- PBS (talk) 23:47, 26 September 2015 (UTC)
{{cite encyclopedia}}
is an odd duck. If there is no |title=
then |encyclopedia=
, if set, is promoted to |title=
(this is why there is no missing title error message). It does this for the metadata. So the error message was correct in a sense. I'll see about improving that.
The test is intended to catch exactly the condition that you illustrated in your first post. Links to external cites do not belong in title-holding parameters because that corrupts the metadata. You should not rely on your work-around as a permanent fix. Even though there is no visible error message, the metadata are still corrupt.
{{cite encyclopedia |encyclopedia=[[w:Dictionary of National Biography|Dictionary of National Biography]] [http://www.archive.org/stream/dictionaryofnati00leesuoft#page/n2/mode/1up Index and Epitome]}}
- Dictionary of National Biography Index and Epitome.
{{cite encyclopedia}}
: External link in
(help); Missing or empty|encyclopedia=
|title=
(help)
produces this metadata for title:
&rft.btitle=Dictionary+of+National+Biography+%5Bhttp%3A%2F%2Fwww.archive.org%2Fstream%2Fdictionaryofnati00leesuoft%23page%2Fn2%2Fmode%2F1up+Index+and+Epitome%5D
Why does {{cite DNBIE}}
not use |title=
?
—Trappist the monk (talk) 00:10, 27 September 2015 (UTC)
|title=
is an optional parameter, which is usually set. I have not given it a value in this example so that it is clear that the problem lies in the handling of|encyclopedia=
.- But even if title is set it will not affect the outcome according to the documentation (as
|title=
gets mapped to|article=
in the case of{{cite encyclopedia}}
) so the alleged problem and the fault in the error message will remain the same. -- PBS (talk) 01:19, 27 September 2015 (UTC)- I did say that I will work on fixing the error message.
- "The test is intended to catch exactly the condition that you illustrated in your first post. Links to external cites do not belong in title-holding parameters because that corrupts the metadata." Who claims it is a corruption to pass an external link into the encyclopedia parameter? -- PBS (talk) 01:23, 27 September 2015 (UTC)
- You can see the corrupted data in Trappist's note above. I suggest putting the URL into one of the provided URL parameters, e.g.
|url=
,|chapter-url=
. – Jonesey95 (talk) 02:27, 27 September 2015 (UTC) - A decision was taken long ago to keep
|title=
and|url=
separate. There are separate keywords in the metadata for them. Because{{cite encyclopedia}}
promotes|encyclopedia=
to|title=
when it can, a url in|encyclopedia=
ends up in|title=
in violation of that decision to keep|url=
and|title=
separate.
- You can see the corrupted data in Trappist's note above. I suggest putting the URL into one of the provided URL parameters, e.g.
Here's a hack of {{cite encyclopedia}}
that links to a wikisource article, links to the Internet archive image of the book, and links to the DNB article in wikipedia:
{{cite encyclopedia | editor-first = Sidney | editor-last = Lee | year = 1903 | article = [[s:Phayre, Robert (DNB00)|Phayre, Robert (DNB00)]] | title=Index and Epitome |encyclopedia=[[Dictionary of National Biography]] |url=http://www.archive.org/stream/dictionaryofnati00leesuoft#page/n2/mode/1up |title-link= }}
which produces this; no errors and cleaner metadata:
- Lee, Sidney, ed. (1903). Index and Epitome. Dictionary of National Biography. .
—Trappist the monk (talk) 10:14, 27 September 2015 (UTC)
- @I a aware that such a change can be made but in doing this you are altering the title which is "Dictionary of National Biography Index and Epitome" (hence the format in the template). I presume you have not looked at the template as the link is in the page parameter. The index only has a very short entry for a subject (usually about a couple of dozen entries a page). If it is acceptable to include a url in pages I fail to see why it is not acceptable to include it in the parameter encyclopedia.
- @Jonesey95 Trappist the monk. Where there a consensus that a change would be made in {{cite encyclopedia}} the so that a URL could not be placed in the encyclopedia parameter? -- PBS (talk) 18:51, 29 September 2015 (UTC)
- PBS, the discussion was here. I think we might be over-reaching a bit with our URL detection, given that we do not offer a
|*-url=
parameter that accompanies each parameter that would be useful to match with a URL. As the error category continues to populate, it has become clear that there is a desire among editors to provide useful links to match|journal=
and|encyclopedia=
, for example. – Jonesey95 (talk) 19:21, 29 September 2015 (UTC)
- PBS, the discussion was here. I think we might be over-reaching a bit with our URL detection, given that we do not offer a
- I don't know that you should make such a presumption about what I have or have not done. The point of my example was to show that
|article=
,|title=
,|work=
can all be used in{{cite encyclopedia}}
without error and with cleaner metadata, not to explore the minutia of{{cite DNBIE}}
. I know that the book title is Dictionary of National Biography Index and Epitome but I chose leave them separate as{{cite DNBIE}}
does merely for the sake of example.
- I don't know that you should make such a presumption about what I have or have not done. The point of my example was to show that
Template:Cite_episode issue
This template is causing Template:Cite_episode to do the following:
- Appending %7CAudio: to URLs in links
- Show the error Check |episode-link= value (help); Check |series-link= value (help); even though the links are valid
- Render the series= with more than one word to show only the last word in the link
--Lantrix //Talk//Contrib// 17:02, 29 January 2016 (UTC)
- It appears Lantrix is referring to reference #732 in Endorsements for the Republican Party presidential primaries, 2016:
{{Cite episode |title=Audio: No Agenda Episode 741 - Bad Optics |episode-link=https://www.noagendaplayer.com/listen/741/1-28-18 |access-date=2016-01-30 |series=No Agenda |series-link=http://www.noagendashow.com/ |city=Austin |number=741 |time=88:18 |transcript=I Adam Curry am as of today officially, officially announcing my full support my endorsement, my coveted endorsement ... for Donald Trump for Republican candidate for the Presidency of the United States of America. |language=English}}
- "Audio: No Agenda Episode 741 - Bad Optics". No Agenda. Episode 741. Event occurs at 88:18. I Adam Curry am as of today officially, officially announcing my full support my endorsement, my coveted endorsement ... for Donald Trump for Republican candidate for the Presidency of the United States of America.
{{cite episode}}
:|access-date=
requires|url=
(help); Check|episode-link=
value (help); Check|series-link=
value (help); External link in
(help); Unknown parameter|episode-link=
and|series-link=
|city=
ignored (|location=
suggested) (help)
- GoingBatty (talk) 18:29, 29 January 2016 (UTC)
- @Lantrix: Per Template:Cite episode#Title, the parameters
|episode-link=
and|series-link=
are for linking to a Wikipedia article, whereas|url=
is for the URL. Therefore, I think this is what you want:{{Cite episode |title=Audio: No Agenda Episode 741 - Bad Optics |url=https://www.noagendaplayer.com/listen/741/1-28-18 |access-date=2016-01-30 |series=No Agenda |series-link=No Agenda |city=Austin |number=741 |time=88:18 |transcript="I Adam Curry am as of today officially, officially announcing my full support my endorsement, my coveted endorsement ... for Donald Trump for Republican candidate for the Presidency of the United States of America."|language=English}}
- "Audio: No Agenda Episode 741 - Bad Optics". No Agenda. Episode 741. Event occurs at 88:18. "I Adam Curry am as of today officially, officially announcing my full support my endorsement, my coveted endorsement ... for Donald Trump for Republican candidate for the Presidency of the United States of America". Retrieved 2016-01-30.
{{cite episode}}
: Unknown parameter|city=
ignored (|location=
suggested) (help).
Maybe someone else can figure out why there are two periods at the end of the citation.Thanks! GoingBatty (talk) 18:37, 29 January 2016 (UTC)Facepalm - sorry, my bad. GoingBatty (talk) 18:40, 29 January 2016 (UTC)
- @Lantrix: Per Template:Cite episode#Title, the parameters
Updating help
Excuse me if this is the wrong forum, but I am trying to update the Haitian Creole Wikipedia’s version of this file and WhatamIdoing mentioned that Trappist the monk would probably be able to figure this out. When I copy from here and paste to there, then preview what that update would do, I keep seeing the same error appear where I would expect to see well‑formed citations. It says there is a Lua error in Module:Citation/CS1 on line 2968 (a line that doesn’t exist, before or after the potential update): “attempt to call field 'set_selected_modules' (a nil value)
”. Thank you. —LLarson (said & done) 21:24, 18 February 2016 (UTC)
- You must copy the whole suite; it won't work if you don't. Copy these:
- Probably best to copy them to sandbox versions so that you can test to make sure everything is right before you dump this whole very big change onto your unsuspecting editors. Then, once you are convinced that all is working right, and you have made whatever local changes you want to make, you can overwrite the live version from the sandbox (again, all of the modules).
- If you need more help, shout.
- And yes, line 2968 does exist in the English version of Module:Citation/CS1. The error message occurred because ht:Module:Citation/CS1/Date validation does not have the required function set_selected_modules().
- —Trappist the monk (talk) 00:17, 19 February 2016 (UTC)
- and here's more to do:
- copy Help:CS1 errors to ht:Help:CS1 errors
- create ht:Category:CS1 and the subcategories that it holds so that all of the module's categorization works properly.
- —Trappist the monk (talk) 17:19, 19 February 2016 (UTC)
- Just so I’m sure I understand, you recommend that I copy the contents of en:Module:Citation/CS1/[suite files] into ht:Module:Citation/CS1/[suite files]/Sandbox and then once all of the subpage sandboxes are up‑to‑date, that I replace their parent pages with the sandboxed subpage version? (Background that may not be applicable: I’m not sure if the sandbox would in fact be necessary as long as I updated the suite all at once—there are just three files to go; it was our intention was to move the files and have them working there in English and only then to translate the localizable strings.) Thank you again, —LLarson (said & done) 20:39, 19 February 2016 (UTC)
- Yep, I do. But, I'm conditioned by the way things must be done here where the module suite is used by a couple million pages. At ht.wiki where the number of pages using the module suite is significantly fewer, not such a problem. There is an update to the modules scheduled for tomorrow 20 February 2016 so you might wait for that or just take copies from the en.wiki sandboxes.
- —Trappist the monk (talk) 22:44, 19 February 2016 (UTC)
- Fantastic. Thanks so much! —LLarson (said & done) 22:55, 19 February 2016 (UTC)
- @Trappist the monk: I just saw that you helped update on ht:—thank you!! This is not urgent and it looks like you have a lot on your hands today, but I have two questions: 1. When I copy en:Category:CS1 and its subcategories to ht:Category:CS1, how deep do I need to go? (there might be over 200 including the sub-subcategories) and 2. I can’t figure out why some entire reference areas are now italicized there (incorrect) but not here (correct), when they’re using essentially the same references. Thoughts? Thank you again! —LLarson (said & done) 16:14, 20 February 2016 (UTC)
- Most important are the error and maintenance cats; there are only 46 of them. The properties cats won't help fix malformed cites so aren't as important. Perhaps add a few whenever you have nothing better to do ...
- cs1|2 citations are wrapped in
<cite>...</cite>
tags which browsers tend to style in italics. Find a local admin who can modify ht:MedyaWiki:Common.css to contain this:
- @Trappist the monk: I just saw that you helped update on ht:—thank you!! This is not urgent and it looks like you have a lot on your hands today, but I have two questions: 1. When I copy en:Category:CS1 and its subcategories to ht:Category:CS1, how deep do I need to go? (there might be over 200 including the sub-subcategories) and 2. I can’t figure out why some entire reference areas are now italicized there (incorrect) but not here (correct), when they’re using essentially the same references. Thoughts? Thank you again! —LLarson (said & done) 16:14, 20 February 2016 (UTC)
/* Reset italic styling set by user agent */ cite, dfn { font-style: inherit; } /* Straight quote marks for <q> */ q { quotes: '"' '"' "'" "'"; }
- I included the css for
<q>...</q>
because cs1|2 uses that tag as well. Both of those are at the top of en:MediaWiki:Common.css - —Trappist the monk (talk) 16:54, 20 February 2016 (UTC)
- Trappist the monk, thanks for this.
- I'm hearing that we should have been using Special:Import for this, because it reportedly finds and copies all of the dependencies automagically. WhatamIdoing (talk) 16:08, 24 February 2016 (UTC)
- I included the css for
ref stripmarker in |title= at position 1
When I (of course incorrectly) add an {{sfn}}
tag inside a citation, I'm getting the error message
ref stripmarker in
|title=
at position 1
I'm wondering if we can be a bit more helpful to less experienced editors who wouldn't understand the error message at all. How about:
Detected a
<ref>
stripmarker in|title=
. Please use an inline citation inside another citation.
PanchoS (talk) 10:39, 25 February 2016 (UTC)
- Was the error message's help text not helpful? I would rather enhance that than create more verbose error messages.
- —Trappist the monk (talk) 11:09, 25 February 2016 (UTC)
Access-date localization
Hello, can someone help me? I want to localize {{Cite web}} from English Wikipedia but I am failing to localize "access-date". Is it possible to change the date format of "access-date" field to another in module configurations? (currently it is YYYY-MM-DD).--Zygimantus (talk) 08:00, 5 March 2016 (UTC)
- This question answered at Help talk:CS1 errors#Access-date localization. One conversation in only one place please.
- —Trappist the monk (talk) 11:24, 5 March 2016 (UTC)