Template talk:Citation/core

COinS
Support for COinS was removed in 2012 due to performance issues. The majority of CS1 templates have been migrated to Lua, but a few of the lesser used CS1 templates still use core, as well as a number of specific-source templates. Given that the use per page is going to be fairly low, I think we can restore COinS support. --  Gadget850talk 13:43, 10 March 2014 (UTC) ✅ --  Gadget850talk 07:29, 28 March 2015 (UTC)
 * Support re-adding COinS: I agree it would be better to restore the COinS metadata, removed to reduce wp:post-expand include size by ~20% (in pages which had used hundreds of CS1 cites). Some Bots need the COinS data to validate the cites & weblinks. -Wikid77 14:40, 10 March 2014 (UTC)
 * Agree as a Zotero user. Shyamal (talk) 08:58, 12 March 2014 (UTC)
 * Support AIUI, removal was only every supposed to be temporary. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 14:16, 12 March 2014 (UTC)

Template:Citation: CS1 or CS2?
Template:Citation/core includes this:
 * These templates have been converted to use Module:Citation/CS1 so no longer use
 * Template:Citation
 * Template:Cite book

This implies that Template:Citation is CS1. I thought Template:Citation is CS2. Clarification, please. —Anomalocaris (talk) 07:40, 21 January 2015 (UTC)
 * It implies no such thing. It implies that citation uses the same underlying software module as the CS1 citations. The module's name happens to have "CS1" in it. That's not the same thing as being part of the same style. —David Eppstein (talk) 07:42, 21 January 2015 (UTC)

Protected edit request on 27 March 2015
Broken link in reference ref
 * Citation class adds the specified HTML class to the span that encloses the citation. The name must be one word (separate words are separate classes) and must meet the name rules.

/ref ,i.e. http://www.w3schools.com/tags/att_global_class.asp
 * should be,

Sechinsic (talk) 21:36, 27 March 2015 (UTC)

Sechinsic (talk) 21:36, 27 March 2015 (UTC)


 * You are correct on how classes work. The template applies two classes:  which has CSS for highlighting and a specific class for each template. Where is the problem? --  Gadget850talk 21:48, 27 March 2015 (UTC)
 * I think that means that of the two w3schools links that they posted above, the first one throws a HTTP 404 error. -- Red rose64 (talk) 22:16, 27 March 2015 (UTC)
 * Aha! The link in the unprotected documentation is bad. --  Gadget850talk 22:18, 27 March 2015 (UTC)
 * --  Gadget850talk 22:20, 27 March 2015 (UTC)
 * Thanks. Editing past my bedtime.Sechinsic (talk) 22:26, 27 March 2015 (UTC)

Throw an error if template is used directly?
There's really no reason for why this should be used directly on articles. We should throw an error and tell people to use either citation or. Headbomb {t · c · p · b} 14:18, 19 June 2017 (UTC)
 * I don't think that's possible. Templates don't know how they are called.  Templates know nothing of the outside world and can only 'see' the parameters that they are given.
 * —Trappist the monk (talk) 14:34, 19 June 2017 (UTC)
 * Have a dummy ♥ parameter set in the templates which suppresses the error, kinda like what AFD does to detect if it's been substed? Headbomb {t · c · p · b} 14:46, 19 June 2017 (UTC)
 * Yeah, I thought about that but didn't relish the thought of changing some 70ish templates and then still needing to fix the 850ish articles that use . If I were to spend any time at all on this problem, better I think to automate fixes to article space; which job has been on my queue of things to do for a while now.  But, if you want modify these templates and, I don't object.
 * —Trappist the monk (talk) 15:34, 19 June 2017 (UTC)
 * It involves dealing with LUA. I couldn't code my way out of a paper bag in LUA, otherwise I'd have made a bunch of easy-to-fix things in these templates like the DOI linking when they are inactive a long time ago. Headbomb {t · c · p · b} 15:38, 19 June 2017 (UTC)
 * I think you are mistaken.  is wikitext and so are most, if not all, of the templates that call it.  However,  is protected but its sandbox is not.  When you're ready, let me know and I'll sync the live version from its sandbox.
 * —Trappist the monk (talk) 15:48, 19 June 2017 (UTC)

I just did this because it caused IABot to stumble with automated archiving, and I don't think IABot (and other tools) should need to know how to deal with this template. It seems reasonable to convert them to other standard templates, but it seems work intensive to automate. There are about 3500 instances. Should we make a bot request? I doubt anyone will, but worth a try.. -- Green  C  16:17, 1 December 2017 (UTC)
 * If I had any time to devote to this but, I don't; I'm tied up with and the  templates right now.  Given that, perhaps we should reconsider adding a parameter to the relatively few remaining templates that call  to tell  that it is being called by another template.  That parameter not being set where  is called directly in article space would return an error message and a category:
 * in a calling template ( for example), add this line to the call:
 * ok-I-won't
 * in add something like this (this version would replace the citation with an error message in much the same way that cite.php errors do) with help text on the category page:
 * Of course, spoofing is possible but we would hope that editors would not do that.
 * —Trappist the monk (talk) 18:29, 1 December 2017 (UTC)
 * —Trappist the monk (talk) 18:29, 1 December 2017 (UTC)

, there are 3,900 instances, but not all of them are because of direct usage in templates. It looks like 2,500 of them are cite wikisource (I could be wrong). It might be best to convert that template to use CS1 (or tag it somehow to locate direct citation/core calls) before proceeding further. – Jonesey95 (talk) 20:09, 1 December 2017 (UTC)
 * It looks like there are about 956 pages in article space using citation/core directly. – Jonesey95 (talk) 20:37, 1 December 2017 (UTC)

translating citation/core
Coming back to this after a long while – does not belong in article space.

With that declaration made, I have cobbled up an awb script that brute-force translates to. It is not for the script to interpret anything, it only renames existing parameters to cs1|2 parameters (empty parameters are removed). Parameters that are not listed in the documentation are not translated; misspelled parameters are ignored. The script does not touch parameter values except for At when that parameter looks like either of these (from substing of ):
 * p.&amp;nbsp;... (where the  is any and all text between the   and the next   or  )
 * pp.&amp;nbsp;...

When these occur, they are replaced with the appropriate page or pages (by translating the  and  ).

Machine translations are never perfect so templates translated by this script may be flawed because allows parameter combinations that cs1|2 do not; swallows undefined parameters that cs1|2 will reject; no doubt there are other reasons for flawed results. For example, this:

translates to this:

I leave it to someone who has German to figure out what should be done with that.

The edit summary for edits made by this script will link to this discussion and also make the suggestion that interested editors should check the edit results and repair any errors.

—Trappist the monk (talk) 00:19, 17 December 2018 (UTC)
 * Added a tweak to the awb script so that it deletes yyyy when there is also a yyyy and  in both is the same.
 * —Trappist the monk (talk) 18:16, 17 December 2018 (UTC)


 * I am neither familiar with templates nor with citations but the "IncludedWorkTitle"-parameter in your example above seems to refer to the title of a series of articles or books and could possibly also be interpreted as a "subtitle". (But you had probably figured that out already ...)
 * best, KaiKemmann (talk) 03:45, 13 January 2019 (UTC)

Reduce protection?
Hi. Currently, the template appears to only have 188 transclusions due to the migration to Module:Citation/CS1 - maybe full protection is too much? --DannyS712 (talk) 05:34, 12 June 2019 (UTC)