Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module talk:Sandbox/Tom.Reding/Tools

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

ResolveEntityId inconsistency?

[edit]

Ahecht, I have a function that I expect to output "Aridibacter Q26209683 Q16521 (taxon) Q34740 genus - child has description: genus of bacteria" when an entity ID is found.

However, the function did not succeed on Aridibacter (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 Blastopirellula (Q26219523): "Blastopirellula Q# not on Wikidata OR no sitelink" ('Q# not found on Wikidata'). I've made a dummy edit to Blastopirellula (Q26219523), but there's still a problem with resolveEntity._id, it seems. Do you know what's going on?   ~ Tom.Reding (talkdgaf)  23:59, 27 December 2018 (UTC)Reply

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 (talkdgaf)  06:00, 28 December 2018 (UTC)Reply
@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)Reply