Module talk:Authority control
Module:Authority control has been template protected indefinitely because it is a highly-used or visible template. Use {{Edit request}} on this page to request an edit. |
| |
Use interwiki links instead of external links if possible
[edit]Because this module is very widely used (some 17½ million transclusions), and external links put more strain on the database than interwiki links (see discussion at T343131), it would be great if this module could use interwiki links instead of external links for as many identifiers as possible (for instance, [[viaf:64009368|64009368]]
instead of [https://viaf.org/viaf/64009368/ 64009368]
). I’ve put together a first version of this on the sandbox (conf diff, code diff), which seems to work so far. It has two main limitations that I can see:
- Not enough properties have suitable interwiki prefixes yet – VIAF, and the link to Wikidata’s Special:BookSources, are the only ones I found. This should be straightforward to fix if we decide to go ahead with this: request more prefixes at meta:Interwiki map. Some of the formatter URLs might not be very well suited for interwiki prefixes, but I think plenty of them should work just fine (e.g. https://d-nb.info/gnd/, https://issn.org/resource/issn/, https://www.worldcat.org/oclc/).
- Module:Authority control/conf is supposed to be automatically generated (at Template:Authority control/IdentifierList, based on data from Wikidata), so we can’t just manually add a bunch of
interwiki_format
entries like I’ve done in the sandbox config. I guess Template:Authority control/IdentifierList row should use some Lua code to check the mw.site.interwikiMap? And/or just hard-code a number of “if URL = X then emit interwiki format Y” entries (e.g. to deal with the fact that the VIAF ID (P214) formatter URL has a trailing slash but theviaf:
interwiki doesn’t).
What do you think? (CC Jarekt.) Lucas Werkmeister (talk) 18:52, 2 August 2023 (UTC)
- I've asked at d:Wikidata:Project chat#Interwiki for external sites about creating an equivalent to formatter URL (P1630). Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 19:24, 2 August 2023 (UTC)
- https://commons.wikimedia.beta.wmflabs.org/wiki/External_link/test, see Phab. Interwiki vs. JS redirector both have their pros and cons so feel free to discuss. - Alexis Jazz ping plz 03:59, 3 August 2023 (UTC)
- Thank you, but disabling links for people (or user agents) who do not use JavaScript is not a good idea. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 09:59, 3 August 2023 (UTC)
- Lucas Werkmeister, I am camping until mid August with sporadic access to the internet. I will be happy to look at this when I am back. Feel free to ping me if I do not get back here before Aug 20 or so. --Jarekt (talk) 23:44, 3 August 2023 (UTC)
- Lucas Werkmeister, I had a chance to look at proposed code and I think use of interwiki prefix at Wikimedia (P6720) by adding it to properties, the way Andy Mabbett did for viaf would work. I modified Template:Authority_control/IdentifierList_row to add them to all properties, regenerated Module:Authority control/conf with extra interwiki_format field and modified Module:Authority control/sandbox to use it. It added interwiki_format to VIAF and empty string to other properties. If you think this approach would work, I can deploy. I think it would be worth analyzing which domains are used the most and prioritize those when asking for new interwiki prefixes. --Jarekt (talk) 06:05, 8 August 2023 (UTC)
- @Jarekt: Sounds good to me. Looking at the list, the top priorities should probably be OCLC control number (P243), ISNI (P213) and Library of Congress authority ID (P244). (I also noticed that www.worldcat.org has lots of HTTP matches in that list in addition to the HTTPS ones – I don’t think those are generated by this module, but we can still have a bot migrate them to the new interwiki once it exists.) Lucas Werkmeister (talk) 21:16, 8 August 2023 (UTC)
- @Jarekt: Are you able to take a look at this now, please? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 20:44, 31 August 2023 (UTC)
- @Pigsonthewing and Lucas Werkmeister: I deployed the code. --Jarekt (talk) 01:36, 7 September 2023 (UTC)
- @Jarekt: Thank you very much, that seems to have helped quite a bit –
SELECT COUNT(*) FROM externallinks WHERE el_to_domain_index = 'https://org.viaf.';
went down from almost 12 million (P49955) to just 820 thousand now (specifically820559
at the moment). Lucas Werkmeister (talk) 14:01, 20 January 2024 (UTC)- Lucas, I do not know the process of introducing interwiki prefixes for other external links, but if more are created (perhaps for OCLC control number (P243), ISNI (P213) and Library of Congress authority ID (P244)) and someone pings me I can add them to the ((tl|Authority control}}.--Jarekt (talk) 15:51, 21 January 2024 (UTC)
- @Jarekt: I’ve just started a discussion on meta:Talk:Interwiki map#Several frequently used sites on Wikimedia Commons, let’s see how that goes. Lucas Werkmeister (talk) 21:42, 21 January 2024 (UTC)
- Lucas, I do not know the process of introducing interwiki prefixes for other external links, but if more are created (perhaps for OCLC control number (P243), ISNI (P213) and Library of Congress authority ID (P244)) and someone pings me I can add them to the ((tl|Authority control}}.--Jarekt (talk) 15:51, 21 January 2024 (UTC)
- @Jarekt: Thank you very much, that seems to have helped quite a bit –
- @Pigsonthewing and Lucas Werkmeister: I deployed the code. --Jarekt (talk) 01:36, 7 September 2023 (UTC)
- Thank you, but disabling links for people (or user agents) who do not use JavaScript is not a good idea. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 09:59, 3 August 2023 (UTC)
This use of interwiki prefix at Wikimedia (P6720) on a property is nonstandard and causing constraint violations. While I changes some constraints to not error in this case, I think it would make more sense to check for a interwiki prefix at Wikimedia (P6720) on the Wikidata item of this property (P1629) of the property rather than the property itself, which would probably pick up a bunch of existing interwikis. * Pppery * it has begun... 01:56, 2 July 2024 (UTC)
Union List of Artist Names
[edit]Could we add Union List of Artist Names ID (P245)? Thanks for any input, --Marsupium (talk) 20:42, 1 September 2023 (UTC)
- Marsupium ULAN should be part of this template. --Jarekt (talk) 01:31, 7 September 2023 (UTC)
ISNI
[edit]It looks like ISNI output is broken, both in the examples and on creator pages. The URLs 404 and the validation doesn't match the documentation on {{Authority control}} or ISNI (P213). AntiCompositeNumber (talk) 21:50, 29 December 2023 (UTC)
- @AntiCompositeNumber and Jarekt: Yes, it looks like wikidata community has decided to change the format (see d:Property_talk:P213#To-do_list). I've updated this module, which fixed ISNI's pulled from wikidata, but not for ISNIs supplied by parameter, as the format at d:Q423048 is still "[0]{4} [0-9]{4} [0-9]{4} [0-9]{3}[0-9X]". —RP88 (talk) 21:55, 2 January 2024 (UTC)
- OK, I've temporarily commented out the code that grouped ISNIs in a parameter. This fixes most of the errors in existing Creator templates. Creator template pages and pages containing them may need to be purged if you want to see the fix immediately. The wikidata community is still running a bot to change the format, so errors may appear on some items until the ISNI on wikidata is updated by the bot. —RP88 (talk) 22:05, 2 January 2024 (UTC)
- RP88 thanks for handling this. --Jarekt (talk) 03:49, 5 January 2024 (UTC)
- OK, I've temporarily commented out the code that grouped ISNIs in a parameter. This fixes most of the errors in existing Creator templates. Creator template pages and pages containing them may need to be purged if you want to see the fix immediately. The wikidata community is still running a bot to change the format, so errors may appear on some items until the ISNI on wikidata is updated by the bot. —RP88 (talk) 22:05, 2 January 2024 (UTC)
Incorrect ORCID regex
[edit]Dear admins,
Currently the ORCID identifiers start not from 0000, but from 0009. It looks like the regex in the function is rendered invalid. Pls, replace the ORCID regex with the following one ^%d%d%d%d%-%d%d%d%d%-%d%d%d%d%-%d%d%d[%dX]$
--David Osipov (talk) 17:35, 30 October 2024 (UTC)