Module talk:Wikidata art/Archive

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Catalogue

Minor layout issue: the way the catalogue code is shown looks a bit heavy handed "The New Complete Van Gogh: Fully revised and enlarged edition of the Catalogue raisonné; catalog code: JH1221". Simply removing the text "catalog code" would match the standard practice outside the Wikiverse. We should at least remove the link to d:P:P528 that looks rather odd. -Zolo (talk) 13:14, 3 November 2018 (UTC)

@Zolo: Agree! I've changed it in the sandbox, result can be seen at Module talk:Wikidata art/sandbox/testcases#Reference. Is this what you had in mind, with the colon between the catalogue name and the catalogue code? --Marsupium (talk) 18:59, 3 November 2018 (UTC)
Or maybe a comma ? I think this is more standard. It may be language-dependent though (in French there is a space before solons and semi-colons). --Zolo (talk) 17:42, 4 November 2018 (UTC)
Zolo, now ✓ Done here with comma. --Marsupium (talk) 19:32, 27 November 2019 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Jarekt (talk) 04:21, 3 February 2022 (UTC)

Plural labels

The depicted person field should switch to "depicted person" when there is only one person. In frwiki this is achieved by returning a second value indicating the number of claims, and that value is used to create the label. Not sure it is really easy convenient to do that with the current version of the module though. --Zolo (talk) 10:09, 5 November 2018 (UTC)

@Zolo: I'm not sure, this should then be implemented also for other fields or for none I think. "Dimensions" for example is also always that even if only one dimension is displayed. "Artist", "Object type", "Accession number" are singular regardless of their content. Mh, indeed current grammatical number of the field labels seems a bit arbitrary. So perhaps, yes, would be good to switch it. --Marsupium (talk) 13:25, 18 May 2019 (UTC)
Field labels can be changed based on content; however that would further complicate already complicated code. I am not sure it is worth it. --Jarekt (talk) 15:47, 18 May 2019 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Jarekt (talk) 04:20, 3 February 2022 (UTC)

Script error if P1472 is invalid

@Jarekt: For example on File:La Patagonia y las tierras australes - Vicente G. Quesada.pdf, because this addition contains Creator:Vicente Gregorio Quesada’s title incorrectly. (I could easily fix the Wikidata item, but I want to preserve it as a test case until the module is fixed.) —Tacsipacsi (talk) 22:07, 19 January 2020 (UTC)

Tacsipacsi, I added a check for that situation. Thanks. --Jarekt (talk) 03:48, 20 January 2020 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Jarekt (talk) 04:19, 3 February 2022 (UTC)

attempt to index field 'claims' (a nil value)

@Jarekt: Yet another error on File:1889 van Gogh Women picking olives anagoria.JPG, File:An Allegory of Intemperance by Hieronymus Bosch.jpeg and many others:

Lua error in Module:Wikidata_art at line 433: attempt to index field 'claims' (a nil value).

(Note that I added SDC to the former so that one can reach Wikidata without entering the edit form, as {{Artwork}}’s link doesn’t appear because of the script error. The latter doesn’t have SDC, and exhibits the same behavior.) —Tacsipacsi (talk) 11:58, 21 January 2020 (UTC)

Fixed I guess a tiny tweak was need to work with items like step ladder (Q3057632). Thanks. --Jarekt (talk) 04:19, 22 January 2020 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Jarekt (talk) 04:18, 3 February 2022 (UTC)

Lua error at line 481

@Jarekt: Last edit has flooded Category:Pages with script errors with "Lua error in Module:Wikidata_art at line 481: attempt to concatenate field '?' (a nil value)". --V.Riullop (talk) 07:08, 27 May 2020 (UTC)

@Jarekt and Vriullop: Propably, line 481 has to be moved in the if in line 482. See my sandbox edit for more details. If I understand it right, the list X is empty if it is no instance of a person. You can't append anything (..) to a nil value. Moving the line in the if will make the program skip it if there's no value in it. The current version is Broken and needs to be fixed immediately. --FF-11 (talk) 07:49, 27 May 2020 (UTC)

{{Edit request}}

Hi, I had that error too. See screenshot on Commons: miniatur|right. Greetz! Bukk (talk) 08:02, 27 May 2020 (UTC)
The issue was fixed. --Jarekt (talk) 13:23, 27 May 2020 (UTC)
Great! Bukk (talk) 13:46, 27 May 2020 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Jarekt (talk) 04:18, 3 February 2022 (UTC)

Item for 'loan'

loan (Q189539) doesn't seem to be the right pick, it has subclass of (P279) financial product (Q15809678). I didn't find a fitting item, so I've created loan (Q105334701). Perhaps we can switch to use that one? Thank you! --Marsupium (talk) 09:14, 6 February 2021 (UTC)

Fixed with this edit. --Marsupium (talk) 13:49, 3 May 2021 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Jarekt (talk) 04:17, 3 February 2022 (UTC)

Remove padding/spacing in string format

{{Edit request}}

Please modify line 801 to include the code:

	Res.IDs = IDs                            -- raw data used to render the template(s)
	if #Creators>0 then
		Res.str = string.format('<table cellpadding=0 cellspacing=0><tr><td>%s</td><td valign="top">%s</td></tr></table>', 
			table.concat(Creators, '\n'),
			core.editAtWikidata(entity.id, prop, lang))

Thanks, ᴀlbanɢeller (talk) 07:33, 17 June 2021 (UTC)

: ✓ Done (already in the code) --Jarekt (talk) 04:11, 3 February 2022 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Jarekt (talk) 04:17, 3 February 2022 (UTC)

Resolving redirect

{{Edit request}} Please change Q16421635 to Q11812678 per toollabs:editgroups/b/KrBotResolvingRedirect/Q16421635. Thanks, ᴀlbanɢeller (talk) 03:31, 23 June 2021 (UTC)

@Jarekt: can you please have a look at this? Cheers, ᴀlbanɢeller (talk) 03:33, 23 June 2021 (UTC)
✓ Done Thank you! Jarekt (talk) 03:44, 23 June 2021 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Jarekt (talk) 04:17, 3 February 2022 (UTC)

Removed Art UK

I was wondering why so many images that are not from art uk were showing up in Category:Images from Art UK. That's because this module uses {{Art UK}} which adds that tracker category. Multichill (talk) 11:16, 14 February 2021 (UTC)

Multichill, I just noticed this note. It seems like many paintings have art-UK identifier and we use {{Art UK}} template to display it. That template is not a source template and does not claim that the file come from there, so perhaps it should not auto-categorize files to Category:Images from Art UK. So altering {{Art UK}} template would be one way to fix it. other way would be to strip all the categories added by such templates, as they are likely incorrect. Which way do you think we should, fix it? --Jarekt (talk) 04:07, 3 February 2022 (UTC)
Multichill, I was just looking at this again and as of Feb 2 we are not calling {{Art UK}} template. User:Marsupium rewrote that part of the code. --Jarekt (talk) 03:40, 8 February 2022 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Jarekt (talk) 03:41, 8 February 2022 (UTC)

Value of object has role (P3831) shouldn't propagate to value of after a work by (P1877) qualifier

The value of the object has role (P3831) qualifier of a creator (P170) statement on Wikidata shouldn't be set (or repeated) for the value of a after a work by (P1877) qualifier on the same statement since this isn't the (meaning) of the qualifier in those cases. But is currently shown like that, e.g. {{#invoke:Wikidata art|debug|wikidata=Q116789709|field=creator|lang=en}} gives:

copper engraver:
creator_role QS:P,Q13365770
Aegidius Sadeler  (–1629)  wikidata:Q1297898 s:en:Author:Aegidius Sadeler
 
Aegidius Sadeler
Alternative names
Aegidius Sadeler (II), Ægidius Sadeler, Egidius Sadeler, Gillis Sadeler, Jiljí Sadeler
Description Flemish printmaker, drawer, painter and miniaturist
son of Aegidius Sadeler (I)
nephew of Jan Sadeler (I)
nephew of Raphael Sadeler
Date of birth/death before July 1568
date QS:P,+1568-07-00T00:00:00Z/7,P1326,+1568-07-00T00:00:00Z/10
 Edit this at Wikidata
1629 Edit this at Wikidata
Location of birth/death Antwerp Prague
Work location
Antwerp (1586-1589), Munich (1590), Rome (1593), Naples, Munich (1594-1597), Prague (1597-1629)
Authority file
creator QS:P170,Q1297898
After Albrecht Dürer  (1471–1528)  wikidata:Q5580 s:en:Author:Albrecht Dürer q:en:Albrecht Dürer
 
After Albrecht Dürer
Alternative names
Albrecht Dürer
Description German painter, printmaker, mathematician, illuminator, copper engraver and art theorist
Date of birth/death 21 May 1471 Edit this at Wikidata 6 April 1528 Edit this at Wikidata
Location of birth/death Nuremberg Nuremberg
Work period 1484 Edit this at Wikidata–1528 Edit this at Wikidata
Work location
Nuremberg (1484–1490), Basel (1490–1494), Strasbourg (1490–1494), Colmar (1490–1494), Frankfurt (1490–1494), Mainz (1490–1494), Cologne (1490–1494), Nuremberg (21 May 1494–1528), Innsbruck (1494), Venice (1494–1495), 1505–1506), Bologna (1505–1506), Milan (1505–1506), Florence (1505–1506), Rome (1505–1506), Augsburg (1518), Antwerp (1521)
Authority file
creator QS:P170,Q4233718,P1877,Q5580
 Edit this at Wikidata

We should adapt the code to prevent this. Best, --Marsupium (talk) 12:40, 16 February 2023 (UTC)

I've added a fix to the sandbox that can go live with the next update if there are no concerns. Best, --Marsupium (talk) 16:16, 27 February 2023 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. --Marsupium (talk) 12:36, 11 April 2023 (UTC)

Translation of inscription not evaluated

It seems under certain circumstances function p.get_inscription() doesn't evaluate a translation of an inscription properly e.g. on [1] the German translation of the inscription should be shown, not the English one, but isn't. Leaving this here as a note for me or someone else to hopefully fix in the future. --Marsupium (talk) 01:50, 9 April 2023 (UTC)

Only the first literal translation (P2441) qualifier was used (which happened to be English in this case). I’ve fixed it in the sandbox (test), but I’m not confident enough to deploy it in the production version. —Tacsipacsi (talk) 10:34, 9 April 2023 (UTC)
ResolvedThank you so much for looking into this! I've deployed the fix. --Marsupium (talk) 11:34, 11 April 2023 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. --Marsupium (talk) 12:36, 11 April 2023 (UTC)

Reference creation from artwork IDs

@Rama: You have added mappings to local templates, shouldn't we simplify this and speed the function up by using formatter URL (P1630) from Wikidata, the mapping can dumped here from the result of some WDQS query like this one using Wikidata property to identify artworks (Q44847669):

SELECT
?property ?propertyLabel # comment out if not needed
?formatterUrl ?subjectItem
WHERE {
  ?property wdt:P31 wd:Q44847669.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  OPTIONAL { ?property wdt:P1630 ?formatterUrl. }
  OPTIONAL { ?property wdt:P1629 ?subjectItem. }
}

Try it!

… and process it with something like (untested, freehand):

properties = {} -- has to be filled with the query above
local references = ''
for property in properties do
	for database_id in getProperty(entity, property) do
		databaseRow = getLabel(subjectItem) .. ': [' .. string.gsub(formatterUrl, '$1', database_id) .. ' ' .. database_id .. ']'
        references = references .. databaseRow
    end
end

This would us also get i18n-ed database labels. Or is the quality of the templates in Category:Museum database templates higher than that result? Then we could perhaps use corresponding template (P2667) to create the table? --Marsupium (talk) 16:44, 19 October 2018 (UTC)

Hello, and thank you very much for your time and attention!
corresponding template (P2667) is exactly what I was hoping to find but, did not. With this we would only have the catalogue ID properties to feed the loop. And maybe not even that, if there is a way to automatically retrieve the list of all Wikidata property for authority control for works (Q19833377), do you think that this would be possible?
Cheers! Rama (talk) 17:02, 19 October 2018 (UTC)
😊 "if there is a way to automatically retrieve the list of all Wikidata property for authority control for works (Q19833377)" I'm afraid afaik that is not possible at the moment. 🙁 But it can be done manually quickly using a query like the one above.
You think we should use the local templates here? But perhaps fallback to a formatter URL (P1630) based output? I haven't looked into them, but are they really better? --Marsupium (talk) 17:10, 19 October 2018 (UTC)
Ah ah, shouldn't we just put them in Module:Authority control and that's it? --Marsupium (talk) 17:25, 19 October 2018 (UTC)
Hello,
I think that we should certainly put them in Module:Authority control; the "that's it" I am less enthusiastic about, I would be inclined to giving these URL more prominence and putting them in "reference" as well. I know it duplicates information a bit, but I fear that they would be only ever be found by people who really know what they are looking for, if relegated to Authority control.
I have never used formatterUrl yet, but the notion of an i18n-ed output does not very appealing indeed. Would you like to give it a try with a code you already have handy, or shall I dig a little bit into the question?
Thank you for your very useful and to-the-point ideas! Rama (talk) 04:32, 20 October 2018 (UTC)
Yes, “ I am less enthusiastic about, I would be inclined to giving these URL more prominence and putting them in "reference" as well. I know it duplicates information a bit, but I fear that they would be only ever be found by people who really know what they are looking for, if relegated to Authority control”, that maybe right …!
I'd love to “give it a try with a code [I] already have handy”. Unfortunately, I have quite some real life work from right now till mid-November, so I will or have to try :-) to take a wiki break … . You will find a nice solution, and I'll be happy to join again in late November! Cdlt, --Marsupium (talk) 11:03, 20 October 2018 (UTC)
Ah yes, those pesky things we have to do off-wiki to fund our activities here... Good luck with these, I hope that when you return we will have something nice to show you! Cheers! Rama (talk) 15:35, 20 October 2018 (UTC)
@Rama: After also MartinPoulter has asked for this now, I've picked it up again and added basic support for the IDs in Module:Wikidata art/sandbox. The reference block for Flowers in an ornamental Vase (Q60723743) composed with the current version of Module:Wikidata art/sandbox now contains Ashmolean museum ID (P6610):
Module talk:Wikidata art/sandbox/testcases#Reference looks also good.
It's only a basic implementation, perhaps we could improve what is displayed before the ID itself, currently it's only the property label.
At the moment there is no support for language of work or name (P407) qualifiers of formatter URL (P1630) (simply all are displayed) and the supported properties and their formatter URLs are in Module:Artwork/Artwork ID properties LUT. @Jarekt: Could we afford to retrieve the formatter URLs of the ID properties live from Wikidata despite the performance loss? Then language of work or name (P407) could be processed in this module and we could get rid of Module:Artwork/Artwork ID properties LUT, otherwise it has to be included there as well.
We also have to think again about the templates here, if we want to use them at all or more of them …
Thanks in advance for any comments if we should do it like this or not! Cheers, --Marsupium (talk) 13:12, 18 May 2019 (UTC)
My goal is to minimize number of full entities that need to be loaded to display an artwork infobox. Module:Authority control/conf was designed to help Module:Authority control with that issue so we do not need to load several dozen entities each time we call {{Authority control}}. I think Module:Artwork/Artwork ID properties LUT does the same (?) and if so than I would keep it around rather than slow down the page loading time for many files. --Jarekt (talk) 18:51, 18 May 2019 (UTC)
Yes, Module:Artwork/Artwork ID properties LUT does the same. Then let's keep the dumped page here that can be updated whenever someone feels like doing it?
Do you agree with the approach to display the IDs and links from all Wikidata property to identify artworks (Q44847669)? Then the property list wouldn't be flexible, so the system of Template:Authority control/IdentifierList wouldn't work here (or only with another query-copy-paste-save round which doesn't seem too attractive to me) and take SPARQL as already in Module:Artwork/Artwork ID properties LUT.
BTW loaded pages: Should the module dependencies of Module:Wikidata art only be loaded in the functions which need them?
--Marsupium (talk) 14:21, 19 May 2019 (UTC)
Having raised this on the Template:Art photo talk page, I'm keen to hear about the progress of this change, and grateful to Marsupium for the work done so far. For the end user as well as for our GLAM partnerships, the link derived from the artwork ID is the most important single link for an artwork: it's the link that gives the most up-to-date authoritative information about the work and it's the link that drives readers to the catalogue of the source GLAM institution. If a GLAM shares thousands of images, and the most prominent links from Commons go to some third-party aggregator with outdated images or metadata, that's bad. The present situation is that when P973 described at URL links are replaced with dedicated catalogue IDs, the link becomes invisible in these Commons templates. I'm not a Lua programmer so the issues raised by Jarekt go over my head: is it going to be possible to get these links displaying in templates in the manner shown by Marsupium? MartinPoulter (talk) 10:42, 13 June 2019 (UTC)
After a long time code for this is now live. Cheers, --Marsupium (talk) 21:13, 15 January 2022 (UTC)
Further improvement on references IMHO was to get rid of the using of Commons templates that are hold in the commons_templates_for_database table. Their inconsistency and unpredictability can be exemplified by {{Bildindex}} that outputs a tracing line break leading to broken layout (the template's edit history reveals different views on the question if this is bug or feature). I've commented it out with this edit. --Marsupium (talk) 01:27, 3 February 2022 (UTC)

Catalogues

I don't think showing "catalogues" at the start of each line like File:Paul-Cézanne - Jas de Bouffan.jpg is very useful. At most it should be shown once as a subsection header. On the other hand, showing the author's name and other info would be helpful, which seems doable by simply using Module:Cite. --Zolo (talk) 08:42, 9 June 2019 (UTC)

 Support Agree. --Marsupium (talk) 21:14, 15 January 2022 (UTC)
Actually the same applies to "described at URL (P973)" etc. as well or even more. Showing it as subsection header sounds like a possibly good idea. I don't know which labels to take and if adding an additional line for that is worth it, but for now getting rid of the weird labels seems to be an improvement to me. I've commented it out with this edit. --Marsupium (talk) 01:27, 3 February 2022 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Marsupium (talk) 19:47, 17 December 2023 (UTC)

"auction" + price & lot

Hi! It's to have "auction" for the provenance of an artwork. It would be even nicer to be able to process price & lot of an artwork too. Greetz! Bukk (talk) 07:26, 9 June 2020 (UTC)

Bukk If you have a specific example it would be great if you can share it. Also if you have any suggestions of how it should be displayed using {{Inscription}}. --Jarekt (talk) 16:36, 9 June 2020 (UTC)
Hi, Jarekt! In File:Christian Mølsted - Morgen efter stormen på København - 1919.png I've used the provenanceEvent template ({{provenanceEvent|type=auctioned|at=Bruun Rasmussen Auctions, (Lot 888/8)|date=2019-09-17|price=DKK 180,000 (EUR 24,000) }} ) to describe the artwork's provenance. In wikidata_art I can describe the auction through P793 and the date of the auction through P585. But how can I describe the auctioneer and the price of the artwork? Greetz! Bukk (talk) 17:24, 9 June 2020 (UTC)
Bukk, so what you are asking for, if I understand correctly, is that you would like {{ProvenanceEvent}} to have fields for price and lot number. I was just looking at {{ProvenanceEvent}} and it can include price information already, but we could add not number. Also I am not sure if there is a standard way to specify auction info in Wikidata. Do you know if there is a way to do it? --Jarekt (talk) 19:55, 9 June 2020 (UTC)
@Bukk and Jarekt: Hi you two, I've adapted Module:Wikidata art/sandbox to send values of location (P276), organizer (P664), price (P2284), lot number (P4775), beforehand owned by (P11811), afterward owned by (P11812) qualifiers through {{ProvenanceEvent}}.
Thus {{#invoke:Wikidata art/sandbox|debug|wikidata=Q96141440|field=object_history|lang=en}} now gives
Of course this would definitely profit from finding more Wikidata properties matching more parameters from {{ProvenanceEvent}}. However, I think it's an improvement that already catches a lot more cases. If you agree, you could deploy the code. Thanks for any comments, --Marsupium (talk) 18:25, 16 December 2023 (UTC)
Marsupium, Thanks. Adding beforehand owned by (P11811), afterward owned by (P11812), etc. was on my to do list. Thanks for tackling it. And I did find a few more event types to add. --Jarekt (talk) 04:35, 17 December 2023 (UTC)
Hi, Marsupium! Sounds good. Greetz! Bukk (talk) 09:35, 17 December 2023 (UTC)
Thanks for your replies and for deploying! --Marsupium (talk) 19:43, 17 December 2023 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Marsupium (talk) 19:47, 17 December 2023 (UTC)

local id_prop_LUT

@Jarekt: https://commons.wikimedia.org/w/index.php?title=Module%3AWikidata_art&type=revision&diff=628673788&oldid=627832103 are your recent changes in connection with

formatter URL (P1630) Museums-object IDs
I noticed that the Museums-object IDs eg. Metropolitan and Pinakothek id do not work used via tl artwork from the file, in wd they work

File:The_Assumption_of_Virgin_Mary_by_Guido_Reni_(1638-9)_-_Alte_Pinakothek_-_Munich_-_Germany_2017.jpg

File:Bartolomeo_degli_erri,_san_domenico_resuscita_napoleone_orsini,_1460-70_ca._(modena).JPG

+ Gemäldegalerie Berlin, Bildindex...
the formatter URL (P1630) doesnot fetch the id, it shows the formatter url

(moved my question here)

@Oursana: , I am still not sure how I broke it, but I assume it was my last edit that broke it. I will try to figure it out or revert. --Jarekt (talk) 02:07, 13 February 2022 (UTC)
ok, good luck. I do not remember since when it occurs, I noticed it this morning, mostly I go via wd to the museum's site?--Oursana (talk) 03:16, 13 February 2022 (UTC)
Fixed @Oursana: , Thanks for spotting and reporting it. --Jarekt (talk) 04:07, 13 February 2022 (UTC)
Super, I do not wonder, that I need this funktion most, obviously. Thank you for fixingOursana (talk) 04:56, 13 February 2022 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Marsupium (talk) 19:47, 17 December 2023 (UTC)

Q11193

Hi. What's the use of this item? It links to base - chemical substance. Can I remove it? --TadejM (t/p) 08:03, 2 March 2023 (UTC)

I've removed it. The section is about positions not about chemical substances. --TadejM (t/p) 23:58, 2 March 2023 (UTC)
Agree, thanks for removing it! (Service link: base (Q11193)) --Marsupium (talk) 19:47, 17 December 2023 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Marsupium (talk) 19:47, 17 December 2023 (UTC)