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.

  • 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)
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)
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)
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)

"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)
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)
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)
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)

This template creates additional categories for files[edit]

@BMacZero, Zolo, Marsupium, TintoMeches, Kazimier Lachnovič, Bjankuloski06, Raoli, Jarekt, Foroa, 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)

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)

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)