Template talk:Object photo

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

Error categories[edit]

Template no longer generates categories.
Suggestions:

  • make it more robust: generate error, warning, maintenance category when object description is not found (after cat move, wrong description, …)
  • Warn the user that when using the template, its object description might need to be adapted after a category rename. This is the task of the template user.
  • Maybe using a hard redirect in another name space towards the actual category name might be a more simple work around to avoid maintenance problems. Don't really know. --Foroa (talk) 07:18, 11 July 2012 (UTC)[reply]
I have added a check for non-existing categories. Warning users that they may need to update the object would be nice, but I cannot think of any way to do it. I have tried to use object = some redirect category on an unused low quality file to see if bots can fix redirects.--Zolo (talk) 09:37, 11 July 2012 (UTC)[reply]
I don't think that this can work. What I meant is passing through a hard redirect in another name space.
I think that there are several files using template:Object photo without object description as this was the only way to remove the category. I might be a good idea to tag such uses too. --Foroa (talk) 09:53, 11 July 2012 (UTC)[reply]
I am not sure that it will work either, just wanted to check. It it does not work, I will try to ask a bot to add it to its instruction set.
Using another namespace would require to maintain one additional page per object, and in that case, it would probably be simpler to move the whole content of the category to the template namespace.
I added a more specific message when the "object" parameter is missing. — Preceding unsigned comment added by Zolo (talk • contribs) 10:15, 11 July 2012‎ (UTC)[reply]

"author" required[edit]

The "author" field should not be required for this template, and an empty "author" field should not set Category:Media lacking author information. {{Artwork}} does not require an author, so this template should not either. The requirements come from {{Photograph}}, but they can be switched off by setting strict= in {{Photograph}}. I propose to do this!? What do you think? Thanks in advance, --Marsupium (talk) 00:14, 11 March 2014 (UTC)[reply]
PS: An example for the template’s current undesirable effects: File:Tizian 066.jpg#Summary.

It may be more cautious to keep requiring the author and add "author: {{Unknown}}" when necessary. This template is mostly useful when there is sufficient data about the photo, so that we may not want to use the standard {{Photograph}}. And these files have more chance to be photographs of 3D objets, where author information are usually required. --Zolo (talk) 11:06, 11 March 2014 (UTC)[reply]
Well, I thought that the template is ought to be used for files whose object information is stored in a {{Category definition: Object}} template regardless of the information existing for the photograph or the dimensions of the object!? My point was that the situation makes file descriptions like File:Tizian 066.jpg#Summary appear messy. But you are right, using {{Unknown}} is a good clean solution I stupidly had not thought of, it has other advantages of course! Thank you, --Marsupium (talk) 12:58, 11 March 2014 (UTC)[reply]
Oops, yes, sorry this template is supposed to be used with {{Category definition: Object}}. I though we were on {{Art Photo}}'s talk page :]. Not sure of what the best solution would be for this template. --Zolo (talk) 19:42, 11 March 2014 (UTC)[reply]

This template creates additional categories for files[edit]

@BMacZero, Zolo, Marsupium, TintoMeches, Kazimier Lachnovič, Bjankuloski06, Raoli, Jarekt, Foroa, and Kaldari: @ZxxZxxZ:

Dear experts, in the discussion Commons:Village_pump#File:Lucernal_microscope-MHS_234-P5200309-black.jpg it was described that using this template puts the file for which it is used also in parent categories of the category into which it is put, due to the template line {{Category:{{{object|{{{Object|{{{artwork|{{{Artwork|}}} }}} }}} }}} }}. I would very much appreciate if you could fix this, since it causes quite some fill-up of a parent category such as Category:Historical light microscopes. I don't want to try it myself, since this template is used a lot and I might mess up.

Examples: File:Microscope of Charles Bonnet-MHS 149-IMG 3894-black.jpg, File:Microscope with camera lucida-MHS 2211-IMG 3908-black.jpg, File:Microscope-IMG 2176-black.jpg, File:Microscope-MHS 455-IMG 3794-black.jpg. The wikitext of the file contains only one category, e.g. Category:Microscope of Charles Bonnet-MHS 149 for the first one. But the resulting web page contains additional categories (in the first case five).

But sometimes this does not happen. Example File:Compound microscope-CNAM 22314-IMG 5027-gradient.jpg.

In both cases, the wikitexts contain nothing but the template and one category, so there is not much else that could cause the behavior. But I have no clue as to why sometimes it happens and sometimes not. Maybe something in the parent category?

(In case you wonder: I have pinged all users who have edited this template in the past). Best Dietzel65 (talk) 19:19, 6 October 2019 (UTC)[reply]

Dietzel65, the {{Object photo}} is kind of a mess and should be avoided as it was superseded by improved {{Artwork}} templates. The problem you see is due to the fact that {{Object photo}} transcludes he whole text of the category mentioned in object field ({{Artwork}} infobox, categories, {{Wikidata Infobox}}, everything). There is a way to set up the category in such a way that only the infobox is transcluded, but it is quite counter-intuitive. There are 2 types of fixes possible:
  1. I changed all the files in Category:Lucernal microscope-MHS 234 to just use {{Art photo}}, and removed {{Artwork}} from the category page. That is the cleanest form.
  2. I also changed Category:Microscope of Charles Bonnet-MHS 149 to only transclude the infobox. That one is still kind of confusing mess, but it mostly work.

I would suggest doing changes like in #1 example, or at the minimum #2 example. to fix other possible cases. --Jarekt (talk) 03:44, 7 October 2019 (UTC)[reply]

Jarekt, thank you so much. I agree that #1 would be the better option, but I guess ideally this would be done by a bot for all the gazillion files where this template is used. I opted for #2 to solve the problem with the files I came accross, just because of time reasons. Dietzel65 (talk) 18:21, 7 October 2019 (UTC)[reply]

Deprecate this template and replace it[edit]

This template is causing all sorts of problems. This template shouldn't be added to any more files and current usage should be replaced. Multichill (talk) 17:37, 23 January 2022 (UTC)[reply]

Indeed. Same for the related Template:Category definition: Object. El Grafo (talk) 10:20, 24 January 2022 (UTC)[reply]
Marked both as deprecated. Added Category:Files using deprecated object photo template as a tracker for this one, the other one already has Category:Pages using Category definition: Object template. I noticed Jarek was already replacing some usage. Multichill (talk) 10:52, 5 February 2022 (UTC)[reply]
@Multichill and El Grafo: I did replacements in all the files with SDC link to Wikidata. I replaced "Object photo" with "subst:Object photo/Art photo" which converted them to {{Art photo}}. Then I used this query to find all the categories where {{Category definition: Object}} is safe to be replaced with plain {{Artwork}}. Many of those pages we can probably remove the {{Artwork}} altogether and rely on {{Wikidata Infobox}} template, but I want to make sure we do not loose potentially useful metadata on more obscure objects. There are still 12k categories in Category:Pages using Category definition: Object template without wikidata link. Majority of them are graves at Père-Lachaise and other cemeteries, so one of the stepping stones of depreciating this template would be to create wikidata items for graves at those cemetaries. User:Pyb was involved in creating many of those categories. Any ideas on how to do it? one way would be to write a script to scrape metadata from many of those categories and use OpenRefine to move data to Wikidata. Any other ideas? --Jarekt (talk) 04:06, 6 February 2022 (UTC)[reply]
@Jarekt: would be nice if Pyb can change his workflow to use Wikidata. Just today Category:Grave of Cécile-Bordeau-Dabit (Père-Lachaise, division 44) got created with the deprecated template.
To be able to do that we need a good model on Wikidata to model these graves. If you see it as a small city than the Père Lachaise division (Q50064469) are the neighborhoods and we also need to add the streets. I made a start at tomb of Cécile, Bordeau and Dabit (Q110825428). Multichill (talk) 11:43, 6 February 2022 (UTC)[reply]
ok, no probem to change my workflow. Thx for the example. Pyb (talk) 13:07, 6 February 2022 (UTC)[reply]
@Pyb: any suggestions on what would be a good location to document how to model this on Wikidata and having good examples? Maybe some existing Wikiproject?
By the way, I updated https://overpass-turbo.eu/s/1fOU to link all divisions to Wikidata. Multichill (talk) 13:26, 6 February 2022 (UTC)[reply]
@Pyb and Jarekt: I put some notes on d:User:Multichill/Père Lachaise Cemetery. Multichill (talk) 14:39, 6 February 2022 (UTC)[reply]
I had my own version of such notes and merged them with yours. --Jarekt (talk) 02:35, 7 February 2022 (UTC)[reply]
@Multichill: Right now, I'm using this project page: Commons:WikiProject Père-Lachaise Cemetery Pyb (talk) 15:37, 6 February 2022 (UTC)[reply]
@Multichill: many graves are associated with a single well known individual. I feel like in addition to burial plot reference (P965) we also need some other property to establish link from person item to grave item and from grave to a person. We do have instance of (P31) = grave (Q173387) and of (P642) qualifier pointing to the buried person, and maybe that is enough, but a better way would be to have 2 properties with inverse constraints. Thoughts? --Jarekt (talk) 13:30, 7 February 2022 (UTC)[reply]
@Jarekt: how about using significant person (P3342) like this? Multichill (talk) 18:32, 7 February 2022 (UTC)[reply]
@Multichill: , I think that is OK. Designated inverse properties would be cleaner, but this is workable. Also Qualifier subject has role (P2868) = location of burial (Q12131650) I think works better then object has role (P3831) = location of burial (Q12131650). (you used both). --Jarekt (talk) 01:30, 8 February 2022 (UTC)[reply]
By the way, I did some query and matched some people on Wikidata with their grave categories on Commons. See d:User:Multichill/Père_Lachaise_Cemetery#People. --Jarekt (talk) 02:28, 8 February 2022 (UTC)[reply]

What has it really been replaced with?[edit]

I don't think Art photo works as a substitute for Object photo - there's a lot of objects in GLAM-institutions that are not art (the top of the template page says to use Art photo instead). Couldn't Template:Photograph of object be used instead? Or something else that has focus on the object in the image, not as art or photo? /Sofie Sigrinn (talk) 10:51, 29 April 2022 (UTC)[reply]

Could Multichill or Jarekt be of help here? (I'm talking about photos like this.) /Sofie Sigrinn (talk) 10:52, 5 May 2022 (UTC)[reply]
Sofie Sigrinn When we say that {{Art photo}} template should be used to replace {{Object photo}} that is because, {{Object photo}} supports reach information about the object itself and about the photograph of the object, as does {{Art photo}}. In case of File:Plastband.jpg you do not provide any information about the photograph and photographer so the generic {{Artwork}} template would be the best. Term "Artwork" my be a bit narrow as the template is meant for any artwork, artifact or museum object. Template:Photograph of object should not be used directly as it was mostly created as a workaround to a technical issue. It is almost identical to Template:Photograph which is meant for historical photographs. Hope this helps and please ping me if you have any questions. --Jarekt (talk) 12:53, 5 May 2022 (UTC)[reply]
By the way, I updated the file to use more internationalization templates, so that File:Plastband.jpg will show up better in Swedish and other languages. --Jarekt (talk) 12:59, 5 May 2022 (UTC)[reply]
Thank you for your quick answer, Jarekt! And also for updating "Plastband". But if the template Artwork is supposed to work even for non-artistic objects (from GLAM-institutions) I think the description in the documentation must be updated ("{{Artwork}} is an alternative to {{Information}} template used for the description of images of artworks, especially those residing in museums or galleries"). /Sofie Sigrinn (talk) 16:57, 5 May 2022 (UTC)[reply]
Sofie Sigrinn, Good idea. I updated English description of the template. --Jarekt (talk) 17:13, 5 May 2022 (UTC)[reply]

Replacing with {{Art photo}}[edit]

@Multichill, Pyb, and Mike Peel: (pinging previous discussion participants) I found a simple way to replace {{Object photo}} with {{Art photo}} without creating Wikidata entries first. For example Category:Aurora electronic calculator DT210 is a category for someones random calculator residing in "left drawer" of "private collection". This object and many similar ones, although unique, does not meet the notability criteria of Wikidata. I found that replacing {{Object photo}} with {{subst:Object photo/Art photo2}} allowed me to copy content of the transcluded category into the file itself which then can be easily clean-up afterwards to produce {{Art photo}} based wikitext like in file File:Aurora electronic calculator DT210 01.jpg. At the moment I used this approach for bunch of objects like the calculator that are very unlikely to get wikidata items, but It can be used for much more, even for all the files using {{Object photo}}. My preferred way is to create a whole bunch of Wikidata items for objects which are in scope of Wikidata, but that approach seems to be going very slowly (2-3 per month with 10k waiting). This could be a reasonable plan B. Thoughts? --Jarekt (talk) 18:29, 28 May 2022 (UTC)[reply]

@Jarekt: That sounds reasonable. My preference would be to just create Wikidata items for all, but that seems to be tricky on Wikidata. It would be good to just migrate things to a standard setup here, and figure out the Wikidata connections in the future. Thanks. Mike Peel (talk) 18:31, 28 May 2022 (UTC)[reply]
@Jarekt: looks good. Still haven't gotten around to doing some bulk work for this. I'll have a look at some of the easy things in the next month. Multichill (talk) 19:14, 28 May 2022 (UTC)[reply]
Multichill we have 2 options: wait for you, me or someone else to create 10k items for categories in Category:Pages using Category definition: Object template (mostly for individual Père-Lachaise graves), at that point after we add main subject (P921) to the files we can easily replace {{Object photo}} with {{Art photo}} , or I can replace {{Object photo}} template with {{Art photo}} with all the artwork fields copied into the file. This second option can be done right now and than we can add items for them at any point in the future (or not). I am fine with either approach. The second one was developed for objects which are unlikely to ever get Wikidata items, I found a bunch and might find more. However it can be used for all the files. Or we can split 10k categories into a group for which we will create items and a group for which we will not. --Jarekt (talk) 01:39, 30 May 2022 (UTC)[reply]
@Multichill: I just finished creating Wikidata items for all the non-grave categories using {{Category definition: Object}} template and converting all the files transcluding them to use {{Art photo}}. I still have some work to do improving newly created wikidata items, but the bottom line is that as of today the only pages using {{Category definition: Object}} or {{Object photo}} are related to Père-Lachaise and other graveyards. --Jarekt (talk) 03:15, 9 June 2022 (UTC)[reply]
@Jarekt: wrote a bot to dig some graves. It's currently digging some easy ones. Multichill (talk) 19:37, 9 June 2022 (UTC)[reply]
@Multichill: Great, once you do the graves we will be all done. BTW, In case it helps any If you just handle item creation and populating the properties, I can handle the Commons side of replacing templates in files and categories. --Jarekt (talk) 01:06, 10 June 2022 (UTC)[reply]
@Jarekt: that would be a good division of work. Might also be some more data to migrate from here to Wikidata like for example the coordinates. We can have a look at that after the missing items got created. Multichill (talk) 16:33, 10 June 2022 (UTC)[reply]
Sounds good to me, let me know if there's anything I can do to help, otherwise I'll stay out of your way. Thanks. Mike Peel (talk) 18:00, 10 June 2022 (UTC)[reply]
@Jarekt: Just to double check: You will me using substitution, right? Take for example Category:Grave of Prumier (Père-Lachaise, division 9) and File:Père-Lachaise - Division 9 - Prumier 01.jpg. I'm not able to transfer all data to Wikidata, but if you substitute it, the individual images will still contain everything that was on the category.
Another question: Does anyone have a bot to empty out Category:Pages with local object coordinates and missing Wikidata coordinates? As you can see a lot of the graves ended up in that category. https://w.wiki/5GLc is still rather short. Multichill (talk) 13:21, 11 June 2022 (UTC)[reply]
@Multichill: Pi bot has a task to import coords from here to Wikidata, although it goes by template uses. I'll make a version that runs through the category. Thanks. Mike Peel (talk) 16:55, 11 June 2022 (UTC)[reply]
Running now. But @Jarekt: does the code follow category's main topic (P301)? Not sure why, e.g., Category:20 Bulvarno-Kudriavska Street, Kiev is still in the category. Thanks. Mike Peel (talk) 17:08, 11 June 2022 (UTC)[reply]
@Mike Peel: Something is now right with the category's main topic (P301) redirect as related to Module:Coordinates. I will look into it. --Jarekt (talk) 11:18, 20 June 2022 (UTC)[reply]
@Jarekt: I created all the missing categories in Category:Graves without Wikidata item. About 2500 files left and in most cases this seems to be caused by your bot substituting the template before the Wikidata item was created. Do you have a way to clean that up?
These files need to be checked. The fix is usually adding the Wikidata id to the template
It looks like 41,000 files are ready for substitution. Multichill (talk) 16:04, 13 June 2022 (UTC)[reply]
Just came back from a week of camping. I will look into it in the coming days. --Jarekt (talk) 03:43, 20 June 2022 (UTC)[reply]
@Multichill: --Jarekt (talk) 04:07, 20 June 2022 (UTC)[reply]
@Jarekt: I hope you had a good trip and have a solution for these last files. Multichill (talk) 18:45, 21 June 2022 (UTC)[reply]
@Multichill: I had 98% solution so now Category:Graves without Wikidata item is down to 60 files. Also Category:Pages using Category definition: Object template is shrinking rapidly. --Jarekt (talk) 02:05, 23 June 2022 (UTC)[reply]
We are down to 160 files in Category:Files using deprecated object photo template, but those are often some odd-balls that might need to be process manually. --Jarekt (talk) 11:52, 23 June 2022 (UTC)[reply]

@Multichill, Pyb, and Mike Peel: ✓ Done Just finished with converting last pages that used {{Object photo}} or {{Category definition: Object}} templates. I also redirected those 2 templates to {{Artwork}}. --Jarekt (talk) 17:58, 23 June 2022 (UTC)[reply]

@Jarekt: Nice work, many thanks for doing this! Thanks. Mike Peel (talk) 08:15, 24 June 2022 (UTC)[reply]
Great to finally get this sorted out. Let's move over to Category:Single artwork templates to get rid of those. I'll start a topic at Category talk:Infobox templates: based on Artwork template. Multichill (talk) 10:20, 25 June 2022 (UTC)[reply]
Multichill, ✓ Done I substituted and deleted those templates. --Jarekt (talk) 16:34, 29 June 2022 (UTC)[reply]