Template talk:Information

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

Info non-talk.svg Template:Information has been protected indefinitely because it is a highly-used or visible template. Use {{Edit request}} on this page to request an edit.
Please test any changes in the template's /sandbox or /testcases subpages, or in a user subpage, and consider discussing changes at the talk page before implementing them.

Category:Author matching Creator template, Creator template not used[edit]

As discussed at Commons:Village_pump, Template:Information/author processing template is called by {{Information}} and adds Category:Author matching Creator template, Creator template not used to files where name in the author field matches existing creator template. We had something similar for {{Artwork}} and {{Photograph}} templates. The problem is that {{#ifexist:...}} is an expensive code and for last 6 years all files using {{Information}} do that check. The purpose of the check is to find candidates for adding Creator templates, but the process can not be done by bot (too many people have the same names) and it does not seems like anybody is working on emptying Category:Author matching Creator template, Creator template not used. I think we should remove it. Any objections? --Jarekt (talk) 02:38, 24 April 2018 (UTC)

✓ Done --Jarekt (talk) 02:11, 8 May 2018 (UTC)

Optional Parameter requests[edit]

Can we have an optional "publication date" parameter for when publication and creation date are different? Also, since the "description" is for visual description like alt in infoboxes can we have a "notes" parameter that would be to note stuff like context of the photo or art, and it would be a parameter of the infobox? Thanks, --PlanespotterA320 (talk) 01:03, 8 May 2018 (UTC)

The purpose of {{Information}} is to provide bare basic. If you need mode we have {{Artwork}} for artworks and other objects, {{Photograph}} for historical photographs, {{Book}} for books and other printed material, {{Maps}}, etc. See Commons:Infobox templates for details. --Jarekt (talk) 02:11, 8 May 2018 (UTC)
None of the have those things separated out.--PlanespotterA320 (talk) 19:08, 21 May 2018 (UTC)

Propose inclusion of location parameter[edit]

Propose to add the parameters of the 2009 {{Information2}} to this one, adding a "location" field to this by default. The location field could take any input, include a string of text, a Wikidata item, {{Institution}}, or {{Location}}. Various people have proposed this often over the years. It seems that there is some resistance but I fail to understand it and maybe someone else can clarify.

{{Information2}} has been available as an option since May 2006. It has 1400 uses as compared to 42 million for the default template. Problems with Information2 is that it is in limbo between approval and being fringe. As I show below with the list of links, location seems like a popular field request for the information template.

This is not the most urgent request because the 2017-2019 roll out of Commons:Structured data seems likely to change the interface anyway, but I thought that it would be useful to check in about changes for now and to get advice about current best practices.

My own project need is to mark collections of images depicting museum objects and archival documents which are from single institutions and not art. My preference would be to incorporate an {{Institution}} template somewhere that says that an object is at an institution. The objects I am considering are texts and objects from science museum collections.

Here are previous conversations talking about either putting location in the {{Information}} template:

Here is one more discussion from the art template seeking a use for museum objects which are not art:

Thanks Blue Rasberry (talk) 16:19, 21 May 2018 (UTC)

Example case[edit]

Consider File:Informed Consent Agreement Between Antonio Benigno and Walter Reed (English).jpg. I have some archival documents like this and a collection of medical devices in a university collection. I would like to note somehow that these objects are at the university, or even a particular collection.

Right now I just have an institution template in the description field of the information template. What better way is there for images of this kind of content? Blue Rasberry (talk) 20:19, 21 May 2018 (UTC)


May we have wikidata parameter as it is in Template:Artwork ?. Is there some alternative template with this parameter, instead?. Thanks, --amador (talk) 04:44, 6 June 2018 (UTC)

In case of {{Artwork}} wikidata parameter has clear meaning: an item which stores metadata for a given artwork. {{Information}} template used by great majority of files, is meant to be used mostly for photographs taken by the uploaders and 2/3 of images on Commons use one of CC license templates( mostly used by such files). Such files do not have associated items on Wikidata, and the danger is that people will be adding Wikidata items for subjects or creators instead. --Jarekt (talk) 11:21, 19 June 2018 (UTC)


I noticed that this template adds all pages with the parameter "Author" capitalized to Category:Files with no machine-readable author. If the parameter is lower-case, then everything is OK. Could anybody with edit rights resolve this issue? --Jarash (talk) 18:12, 10 July 2018 (UTC)

Transcription parameter[edit]

Please can we have a |Transcription= parameter, like in {{Artwork}}? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:08, 3 August 2018 (UTC)

Artwork doesn't have a transcription field. Did you mean the inscriptions field? I don't think it make sense to add an inscriptions field to the Information template as it intended for items with basic information. However, if you can't use {{Artwork}}, don't want to use {{inscription}} inside the description, and you need to add an inscriptions field to {{Information}}, you can use the other fields field to add a custom field. For example, you could do something like the following:
 |description    = 
 |date           = 
 |source         = 
 |author         = 
 |permission     = 
 |other versions = 
 |other fields={{Information field |name={{int:wm-license-artwork-inscriptions}} |value={{inscription |1=example inscription |position=bottom right}}}}
RP88 (talk) 14:53, 3 August 2018 (UTC)
Yes, I meant |inscriptions=. Thank you for the work-around, but a dedicated parameter would be far less kludgy and so more user-friendly. My request stands. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:04, 31 August 2018 (UTC)

Unexpected filename in file description[edit]

Looking at Special:Search/dokkum, I noticed that many results have their excerpt start with a repetition of the file name, which looks messy and unprofessional (in my opinion). For example:

Windmill Zeldenrust in Dokkum.jpg File:Windmill Zeldenrust in Dokkum.jpg

DescriptionWindmill Zeldenrust in Dokkum.jpg English: Windmill Zeldenrust in Dokkum build on the cities bulwark defence. Date 9 February 2013, 16:39:57

(3,464 × 2,309 (3.16 MB)) - 01:18, 24 November 2016

The part that is unexpected is that the excerpt contains the filename, causing it to show up twice. (In addition to lacking of space between it and the word "Description"). I traced this back to Template:Information, which contains the following code (simplified):

<td class="fileinfo-paramfield" lang="{{int:lang}}">
{{int:wm-license-information-description}}<span class="summary fn" style="display:none">{{PAGENAME}}</span><!-- required for hCalendar and hProduct microformat; though hMedia would be more appropriate -->
<td class="description">{{{description|{{{Description|}}} }}}</td>

It is intentionally being added (albeit visually hidden). It has a comment explaining that it is "required for hCalendar and hProduct microformat", but I am unsure to verify whether this is actually working and being used. Does anyone know?

Also, if we want to keep it, I'd propose we move it toward the end of the Template output, rather than on top, and consider adding the class searchaux so that it is not indexed as part of the text content (mw:Help:CirrusSearch). We may want to do the same for the word "Description" as well. --Krinkle 02:19, 27 September 2018 (UTC)

Krinkle, I was just wandering about this and other irregularities of the html produced by this template:
  1. why do we have <span class="summary fn" style="display:none">{{PAGENAME}}</span> in the space where one expects translated word "Description"
  2. why <td> cell for date has "lang" field, which is often wrong. For example HTML of File:Radomsko ul. Reymonta 58.jpg has <td lang="en">styczeń 2015 r.</td> which is incorrect as the cell content is in Polish not English.
Looking at the edit history it looks like user:Rillke first added <span class="summary fn" style="display:none">{{PAGENAME}}</span> with this edit to the cell with the description text and later moved it with this edit to the cell with description field name, explaining that he was fixing HTML-Tidy-hack issues. user:Rillke was not active in last 2 years except for few edits yesterday, but maybe he can help to figure out if this is still used. Also pinging @Pigsonthewing: who often advocates for microformat issues. As for wrong language labels in date <td> cell, that was added by user:Ebrahim with this edit. Ebrahim since we can not determine the language of the content of the date field (if not in standard YYYY-MM-DD format) can we remove the lang field? --Jarekt (talk) 16:02, 1 November 2018 (UTC)

Rewrite in Lua[edit]

Module:Information is designed to replace wikitext implementation of Template:Information, and it can be tested through Template:Information/sandbox. The module is designed pr produce exactly the same html as the current template and it is being tested on small number of files using {{Information2}} template, which at the moment calls Template:Information/sandbox. The rewrite was motivated by future Commons:Structured data when {{Information}} might have to interact with Structured data the way {{Artwork}} or {{Creator}} interacts with Wikidata, but in the mean time it offers 50% faster load time, smaller expansion depth and smaller memory use. Please test {{Information/sandbox}} by temporarily replacing {{Information}} in the most complex and messy description pages you can find. I will do the same. --Jarekt (talk) 12:42, 2 November 2018 (UTC)

I don’t see any traces of {{Information/author processing}} and {{Parse source}}, nor any parameter check (done by Module:TemplatePar in the wikicode version). Maybe the former two should be rewritten in Lua, too, to avoid invoking templates from Lua code (especially the author one: it’s really simple, while the current wikicode implementation runs these tests twice in order to ensure {{author missing}} is not marked as machine-readable author; this could be made even more simple in Lua, at lest in terms of time complexity). —Tacsipacsi (talk) 14:18, 2 November 2018 (UTC)
{{Information/author processing}} was used to find and correct thousands of files with bad metadata. It is done now and Module:Information will ignore any fields with only punctuation. {{Information/author processing}} was also used for checking if there is a creator page matching author name and using that instead. That feature was turned off as it was creating great many wrong creator names. So I thing all current tasks of {{Information/author processing}} are being done by the module. As for {{Parse source}} I also do not think it is necessary anymore, In the past we used it to correct thousands of local translations of "own work" phrase to {{Own}}, but now it is done and with very few being added I do not think we need to perform a check on 50M files to find occasional new case. So in my opinion those 2 templates should be disabled, except that I do not want to do unnecessary edits to the template, if they can be avoided. --Jarekt (talk) 17:23, 12 November 2018 (UTC)
OK, but I would like to have a bot check all usages just before the switch, so that nothing breaks out of a sudden. (Maybe a regular, e.g. monthly, check is also worth to find the new wrong inclusions. This latter can even be narrowed down to the pages that changed since the last run, so it uses far less resources than the template/module version.) Such a test seems pretty easy using Pywikibot. —Tacsipacsi (talk) 20:27, 12 November 2018 (UTC)
Any bot runs that have to go through 50M files would take forever. Maybe if you run it off a data dump, but to run it of the live website I ca usually visit 10-20k pages per day. Also there are no plans for deployment in near future. I was [[Commons_talk:Structured_data#Lua_version_of_the_{{Information}}_template|asked not to deploy for time being]]. BTW, Files affected by {{Information/author processing}} go into Category:Bad author info and files affected by {{Parse source}} can be found here. So anybody can check and fix files that are corrected by those 2 templates. --Jarekt (talk) 00:08, 13 November 2018 (UTC)
Sorry for not having checked the figures. However, I think the 10-20k/day is a realistic number for bots writing the wiki (because of their performance constraints). I’ve just ran a bot doing nothing but printing the article size, and it went through 180,000 pages in around an hour (it preloads pages in 50-article packets, which can be increased to 500 for bot accounts, resulting in an even faster script). It means approximately 4.3 million pages a day, and I think it’s closer to the performance of the bot resolving this task than your 10-20k. So 50M files can be checked within two weeks, which is not instant, but neither something we should call forever. Although the category/template is just as good, except that the category contains only the file-namespace pages, maybe this could be expanded to all pages (hopefully there’s not much). —Tacsipacsi (talk) 00:11, 14 November 2018 (UTC)