How does this template ensure that (for example) if a Wikidata item has two VIAF codes, it only displays one? eg/ Aeschylus has two VIAF and ISNI on Wikidata but the template only imports one of each. I've spent some time reading over Module:Authority control and can't quite figure it out. A simple template call to Wikidata would normally return something like "VIAF1, VIAF2". Andrew Gray (talk) 13:10, 9 November 2017 (UTC)
Related info. When we find doubles the VIAF coordinator merges them at VIAF, but I have not seen corrections in a while. There is a report generated at Wikidata of all entities that have multiple VIAF numbers. Here is the report at d:Wikidata:Database reports/Constraint violations/P214. I think their rule was to keep the lowest number and have the other number as a redirect, so I think the lowest number is reported in the template. There is also a report on Wikipedia assembled manually for duplicates at Wikipedia:VIAF/errors where they are broken down into categories. Some are Wikidata side errors that we can fix, and some are VIAF side errors. --RAN (talk) 14:11, 9 November 2017 (UTC)
@Andrew Gray: In most cases, the line at localstatements=mw.wikibase.getBestStatements(itemId,property) will prevent multiple from being displayed, because someone at Wikidata will probably have set one of statements (where there is more than one for a single property) to the "preferred" rank. I'm not sure if I saw anything in the module which would restrict display should two identifiers pop up with equivalent ranks. --Izno (talk) 15:48, 9 November 2017 (UTC)
@Izno: Very interesting - I had wondered if preferred rank would be the way to do it, but in the Aeschylus example (d:Q40939) both the ISNI/VIAF values have normal ranks. All very mysterious! Andrew Gray (talk) 17:48, 9 November 2017 (UTC)
As a side note, I would prefer for people to use the "deprecated" rank when an identifier use to refer to something or is an older alias (e.g., moved). Please use "preferred" rank only when there is more than one current identifier for an item. "getBestStatements" never returns statements with "deprecated" rank claims (even if those are the only ones). 18.104.22.168 (talk) 21:37, 12 January 2018 (UTC)
The module uses mw.wikibase.getBestStatements to get all values, so if there were two VIAF codes it would get both. Wikidata has some internal mechanism for deciding the order that applies if there are two statements with the same rank. The module then cheats and uses only the first returned value, so any other values are ignored. That is done with wikidataIds where  means the first value is used. Johnuniq (talk) 22:28, 9 November 2017 (UTC)
Thanks - that's really helpful. I'll try and put some time aside to work out how to call the module properly in templates rather than using string-edit hacks :-) Andrew Gray (talk) 21:10, 15 November 2017 (UTC)
I haven't looked at what would be involved, but in principle I could modify the module so it displays all returned values, in order, or perhaps limit it to the first two in case someone goes crazy at Wikidata. I say "in principle" because I'm short of time and it would not happen soon. Johnuniq (talk) 00:19, 16 November 2017 (UTC)
I'm not sure that would be a good thing. All the best: RichFarmbrough, 22:48, 18 November 2017 (UTC).
Yes, restricting it to one would be best. In most cases where there's a duplicate the assumption is that one is secondary or will be deprecated at some point, anyway. There are a few cases where double IDs are encouraged & equally valid but I don't think we currently use any here. Andrew Gray (talk) 11:16, 19 November 2017 (UTC)
I made a minor correction at species:Module:Authority control because function names must be unique (as fixed by JJMC89 in species:Module:Authority control/sandbox). The module can do whatever is wanted, so all that is needed is an example of what should be displayed. Ideally that would be an example of a Wikidata item where BPH is specified as a property, and the wikitext that the template should output given that property. Johnuniq (talk) 22:50, 25 November 2017 (UTC)
I need some help, can you tel me what is the label of the propertie P243) : OCLC control number ? I try "OCLC" and it not work. Same think with WORLDCAT (WORLDCATID is for and other propertie). I want to link to the http://www.worldcat.org/oclc/$1 web site. Thanks.
--FERNANDES Gilbert (talk) 17:04, 8 December 2017 (UTC)
@FERNANDES Gilbert: This relates to a discussion at frwiki and OCLC control number (P243). Please give an example of what is wanted. You might link to an article which displays the authority control box and say what extra text should appear, with the exact URL wanted. Johnuniq (talk) 22:54, 8 December 2017 (UTC)
I am writing from the National Library Board Singapore. We would like to expose the Wikidata identifier National Library Board Singapore ID (https://www.wikidata.org/wiki/Property:P3988) in English Wikipedia. How do we proceed from here?
Please link to an article here at Wikipedia where the proposed addition would make a difference. What additional text with what link would be displayed in the authority control box at the article? There are a lot of libraries and they cannot all be listed so I'm not sure what should happen. Johnuniq (talk) 07:10, 29 December 2017 (UTC)
I am assuming the desire is to add a link like the following example to the authority control at the bottom of the Catherine Lim article:
Of course it is true there are many libraries and the question of how notable such is with regard to authority control and if we should include it should still be debated. 22.214.171.124 (talk) 20:51, 12 January 2018 (UTC)
However, it does not display in the Wikipedia article: Am I missing something here? Nlbkos (talk) 00:50, 2 January 2018 (UTC)
Every property and/or identifier in Wikidata is NOT automatically added to articles which include Template:Authority control. Your comments on this particular talk page seem to indicate some sort of understanding of this. 126.96.36.199 (talk) 20:51, 12 January 2018 (UTC)