Module talk:Sandbox/Tom.Reding/Tools
ResolveEntityId inconsistency?
{{U|Ahecht}}, I have a function that I expect to output "{{#invoke:Sandbox/Tom.Reding/Tools|istaxon|Aridibacter}}" when an entity ID is found.
However, the function did not succeed on {{Q|Q26209683}} until I made an edit by adding a sitelink, so I thought the problem was simply a null edit problem at Wikidata.
However however, my function currently doesn't work on {{Q|Q26219523}}: "{{#invoke:Sandbox/Tom.Reding/Tools|istaxon|Blastopirellula}}" ('Q# not found on Wikidata'). I've made a dummy edit to {{Q|Q26219523}}, but there's still a problem with resolveEntity._id
, it seems. Do you know what's going on? ~ Tom.Reding (talk ⋅dgaf) 23:59, 27 December 2018 (UTC)
:It looks like a site link is required for resolveEntity._id
to work - all of the 45 links in my sandbox were 'Q# not found on Wikidata' until I added site links to most of them. Will think about including this behavior in Module:ResolveEntityId/doc. ~ Tom.Reding (talk ⋅dgaf) 06:00, 28 December 2018 (UTC)
:{{ping|Tom.Reding}} resolveEntityId relies on mw.wikibase.isValidEntityId()
which, as you guessed, requires a local page existing that is linked to the Wikidata item. --Ahecht (TALK
PAGE) 02:10, 1 January 2019 (UTC)