Open main menu


Undeployed edit from sandboxEdit

Jarekt, while using the sandbox for this module, I noticed that you never deployed Special:Diff/252583558. Should that change have been deployed? —RP88 (talk) 20:46, 22 August 2017 (UTC)

Work period?Edit

Jarekt, the display for work period is not currently internationalized. I was thinking about internalizing the display with something like:

args.workperiod = Complexdate._complex_date('-', '', data.P2031, '', '', '', data.P2032, '', '', lang, 1)

but that probably isn't adequate. In addition there should probably also be code that looks at the precession of the dates (is their an existing precision convention for 'circa' on wikidata?). Further complications include possibly parsing floruit (P1317) if it is present and possibly even pulling the start time/end times from work location (P937) (see Vincent van Gogh (Q5582)). Before I begin, do you have suggestions or thoughts? —RP88 (talk) 21:21, 22 August 2017 (UTC)

RP88, I am traveling at the moment with only occasional wifi connection, but I will be back on Friday. I am working on a rewrite of this module cleaning up a lot of code and will be adding new thing missing from the current version. I am wary of making too many changes to the code as the template is used on few million pages, so I let them accumulate. If you would like to work on floruit (P1317) (with and without start data end date quilifiers) or work location (P937), go ahead add it to the sandbox and I will merge it with the changes I am making right now offline. About the proposed internationalization of workperiod: I was thinking about it but it seems like simple yyyy-yyyy format was preferred in this field over an internationalized sentence. --Jarekt (talk) 02:12, 23 August 2017 (UTC)
Hey RP88, I'm afraid there isn't and – I think – can't be "an existing precision convention for 'circa' on wikidata". The data relies on external sources and the reason sourcing circumstances (P1480) and with it circa (Q5727902) were introduced is that the sources often don't give a precision. Best, --Marsupium (talk) 05:41, 24 August 2017 (UTC)

Arbitrary last value picked?Edit

It looks like

				for _, statement in pairs( entity:getBestStatements( P )) do
					if (statement.mainsnak.snaktype == "value") then -- or if statement.mainsnak.datavalue then 
						local v = statement.mainsnak.datavalue.value
						if v['numeric-id'] then
							v = 'Q' .. tostring( v['numeric-id'] )
						data[P] = v

loops over the statements for one property of the Wikidata item and each time saves the QID of the value in v. So only the last value will show up here. Is that correct? For instance Creator:Abdülhamid Han only shows Topkapı Palace (Q170495) as birthloc which is the last value for place of birth (P19) of Abdul Hamid II (Q134817#P19). Probably the ranks for the values should be that way that getBestStatements only gives one value there. The three values violate the single value constraint (Q19474404) of place of birth (P19) and make Abdul Hamid II (Q134817) show up on Wikidata:Database reports/Constraint violations/P19.
It seems that is simply hidden here. The order of the values on Wikidata is arbitrary, it hasn't any meaning, there is no cause to take the last one. All values should be displayed here so that an editors at Commons can stroll over to Wikidata and manually pick the best value by setting the ranks.
BTW: We could use category for value not in Wikidata (P3713) and property usage tracking category (P2875) on the categories in Category:Creator template maintenance like at d:Property:P19#P3713 to promote the data that could be received from Commons. --Marsupium (talk) 19:42, 12 September 2017 (UTC)

Marsupium , Yes at the moment we assume a single value for many properties and if multiple properties are present on Wikidata with the same rank than, only a single (random one) is shown. I was dealing with that by querying the Wikidata database and fixing constraint violations, but you are right that we could display multiple values. I am fine with using category for value not in Wikidata (P3713) and property usage tracking category (P2875) to track some of the categories in Category:Creator template maintenance, although I am confused about how to do it with linking to pag3s on Commons: I could add Category:Creator templates with Wikidata link: redundant image as a sitelink to Category:Local image same as Wikidata , but what to do when Category:Institution templates with Wikidata link: redundant image is created? Maybe Category:Creator templates with Wikidata link: redundant image should be a subcategory of local Category:Local image same as Wikidata. --Jarekt (talk) 20:34, 20 November 2017 (UTC)

Use correct rowspanEdit

Now if there are fewer than 9 data rows, the bottom border of the image cell is missing (at least in Firefox). Since it’s written in Lua, I’m sure it can be modified to give the image cell a rowspan equal to the number of the actually shown rows. —Tacsipacsi (talk) 13:26, 20 November 2017 (UTC)

  Done --Jarekt (talk) 00:31, 29 January 2018 (UTC)


For creator ABC, I expect a category to be automatically added, using ABCs P373, but it does not want to (because of namespace is not 100, which is "portal"?). Can anyone explain why? Ketil3 (talk) 10:12, 18 December 2017 (UTC)

I am sorry I do not understand the question. Can you give an example of a page, what it shows and what you expect it should show? --Jarekt (talk) 21:19, 18 December 2017 (UTC)
I added Creator:Helge Skappel to several images on commons (such as [1]), correctly linked to Wikidata (where the P373 is Commons homecat). For each of these images, I expect there to be a Category:Helge Skappel added automatically (using P373), but it is not added. The Lua program (creator) does say "args.homecat = args.homecat or data.P373".Ketil3 (talk) 04:50, 19 December 2017 (UTC)
Creator templates never add categories to files. In the early days of creator template it was common to add a category to pages like Creator:Helge Skappel, but that caused a lot of issues when people were trying to subcategorize content of an artist directory and could not remove existing categories. It took a lot of labor to fix that and we try to keep file categorization independent of templates since. --Jarekt (talk) 12:44, 19 December 2017 (UTC)
OK, no problem. But, I was confused by the Lua code, thinking the P373 and "homecat" parameter had any significance. Thanks for explaining. Ketil3 (talk) 13:55, 19 December 2017 (UTC)
The significance of "homecat" parameter was to add category to the creator template itself, but without adding it to the files that use it. It seemed like "homecat" parameter was easier to explain than to ask people to add <noinclude>[[Category:homecat]]</noinclude> to each creator template. We opted for simplicity to encourage uniformity. --Jarekt (talk) 17:21, 19 December 2017 (UTC)

Fix for the sortkey bugEdit

{{Edit request}} Please, apply this change to the module. It was tested on Václav Bělohradský (patolog) who now goes under «B(Latin-2 letters)», not under «(» as previously.

More information: template talk: Wikidata person. Regards, Incnis Mrsi (talk) 11:23, 26 December 2017 (UTC)

  Done Awesome! Thank you! Steinsplitter (talk) 11:36, 26 December 2017 (UTC)

Local sortkeys shouldn't be removedEdit

Please take sortkey out of "redundant if commons creator template and wikidata have those fields, without checking values". If they differ the calculated sortkeys will mostly be inferior to the local ones and should not be categorized in Category:Creator templates with Wikidata link: redundant sortkey which says "Please remove sortkey field from Creator template." --Marsupium (talk) 11:10, 28 January 2018 (UTC)

Marsupium i think it is   Fixed now and you are right that was wrong. Now sortkey is redundant if local copy is identical to wikidata derived. --Jarekt (talk) 04:55, 29 January 2018 (UTC)
Great, thank you! Will probably still take some time for the category to shrink again … :) --Marsupium (talk) 19:42, 29 January 2018 (UTC)

No birth year shown when there are multiple birth days in WikidataEdit

Creator:Jean Gilletta has two birth dates in Wikidata: 1856-05-01 and 1856-05-07. Since both are 1856, he has certainly born in that year. However, the header doesn’t show any birth year. I’m sure it’s because the module doesn’t know which one to show—but it doesn’t matter as they are the same. —Tacsipacsi (talk) 09:51, 11 May 2018 (UTC)

I thought that should have worked. I will need to debug it. --Jarekt (talk) 11:48, 11 May 2018 (UTC)
  Fixed --Jarekt (talk) 13:10, 11 May 2018 (UTC)

Links should link to CommonsEdit

In the great {{wikidata infobox}} wiki-links are linked to Commons categories (or articles) based on Wikidata data, but this template links to Wikipedia articles, which is also fine, but bit inconsistent. Is there a particular reason to have links to Wikipedia here? Cheers, Yarl 💭  07:33, 26 September 2018 (UTC)

Return to "Creator" page.