hoo added a comment.
In T143970#4134300, @Ahecht wrote:
mw.wikibase.entityExists('Q404') returns false
Indeed, and that is IMO a bug. I just opened T192462: mw.wikibase.entityExists returns false for redirected entities for this.TASK DETAILhttps://phabricator.wikimedia.org/T143970EMAIL
ReleaseTaggerBot added a project: MW-1.31-release-notes (WMF-deploy-2018-04-10 (1.31.0-wmf.29)).
TASK DETAILhttps://phabricator.wikimedia.org/T143970EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: hoo, ReleaseTaggerBotCc: gerritbot, Tom.Reding, Ahecht, Uzume,
gerritbot added a project: Patch-For-Review.
TASK DETAILhttps://phabricator.wikimedia.org/T143970EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: hoo, gerritbotCc: gerritbot, Tom.Reding, Ahecht, Uzume, Anomie, hoo, Lucie, aude, daniel, Evad37, Aklapper,
hoo added a project: Wikidata-Ministry-Of-Magic.
TASK DETAILhttps://phabricator.wikimedia.org/T143970EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: hooCc: Tom.Reding, Ahecht, Uzume, Anomie, hoo, Lucie, aude, daniel, Evad37, Aklapper, Lahi, Gq86,
Uzume added a comment.
We need a resolveEntityId(eid) that returns nil when there is no such entity. It should also handle redirects from merged items, etc. (also solving T157868). It could also potentially work like resolvePropertyId and return a valid entity ID when given an unambiguous label or
hoo added subscribers: daniel, aude, Lucie, hoo.hoo removed a project: MediaWiki-extensions-Scribunto.hoo added a comment.
I see that implementing this in user land code is not trivial (my approach didn't properly check the numerical part of the ids). Also re-implementing this becomes a mess with
matej_suchanek added a parent task: T112073: Lua in Wikibase (tracking).
TASK DETAILhttps://phabricator.wikimedia.org/T143970EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: matej_suchanekCc: Evad37, Aklapper, D3r1ck01, Izno, Wikidata-bugs, aude, Dinoguy1000,