Jump to content

Template talk:Infobox writer/Wikidata

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Death date confusion

[edit]

@Mike Peel: Frances Frost (permalink) is showing an error for the following infobox item:

Died  February 11, 1959 (aged 53) (Error: Need valid year, month, day)

The following wikitext is a formatted extract from {{Infobox writer/Wikidata}} with the qid and birth/death parameters for the article inserted:

{{age in years and months
  |range=no
  |{{#invoke:WikidataIB
    |getPreferredValue
    |P569
    |name=birth_date
    |qid=Q13563155
    |fetchwikidata=ALL
    |noicon=yes
    |{{birth date|1905|8|3}}
    |df=dmy
   }}
  |{{#invoke:WikidataIB
    |getPreferredValue
    |P570
    |name=death_date
    |qid=Q13563155
    |fetchwikidata=ALL
    |noicon=yes
    |{{death date and age|1959|2|11|1905|8|3}}
    |df=dmy
   }}
}}

Previewing the above shows the error. The reason is that {{death date and age}} includes "(aged...)" in its output, and that is being used as the second parameter to {{age in years and months}} so it is giving an error. The "and age" is wrong. I have just reached this conclusion but am not sufficiently familiar with the details to do any fixes.

By the way, {{age}} has recently been updated and it could be used instead of {{age in years and months|range=no|...}} because |range=no is the default for {{age}}. Using {{age}}, the age in years only would be shown. Johnuniq (talk) 10:27, 17 May 2018 (UTC)[reply]

There is an error when Wikidata has two images

[edit]

Show both filename of images in infobox. I fixed this adding the attribute maxvals=1 to image and caption like Infobox person/Wikidata. Works (now show one image and one caption) but show 1st image and caption of 2nd image.
I do not know how fix this. I tested with {{Infobox writer/Wikidata | fetchwikidata=ALL | noicon=on}} in page Volker Kutscher.
Wikidata is https://www.wikidata.org/wiki/Q123108 (I added a 2nd image/caption because it is more new).--Davidhs0 (talk) 19:29, 17 February 2020 (UTC)[reply]

Get data from Wikidata

[edit]

Why {{Infobox writer/Wikidata}} does not get all data from Wikidata? Now only get name, image and description (at least in my last edit). Davidhs0 (talk) 13:44, 28 May 2021 (UTC)[reply]

@Davidhs0: Make sure to set 'fetchwikidata=ALL'. Also, make sure the info on Wikidata is referenced (and not 'imported from'). Thanks. Mike Peel (talk) 13:49, 28 May 2021 (UTC)[reply]

Putting Wikidata usage up front

[edit]

I noticed that Template:Infobox person/Wikidata/doc#Usage has the usage for fetchwikidata, suppressfields, & noicon just after the TOC, whereas the Template:Infobox_writer/Wikidata/doc#Syntax does not even mention these parameters. Is there any objection to me simply adding these in a similar matter to {{Infobox person/Wikidata}}? @Mike Peel:, I am hoping to get a response from you since you are the creator & primary editor. Peaceray (talk) 17:20, 16 August 2024 (UTC)[reply]

@Peaceray: No objections, note that the defaults may be different here, though. Thanks. Mike Peel (talk) 17:40, 16 August 2024 (UTC)[reply]
OK, thanks, I will have a look at the code to see if I can discern any differences. Peaceray (talk) 17:52, 16 August 2024 (UTC)[reply]