[Wikidata-bugs] [Maniphest] [Commented On] T143970: In Lua modules, there is no way to test for validity of Wikidata entity IDs

2018-04-18 Thread hoo
hoo added a comment.
Note: Until T192462 is resolved, I wont add this to Extension:Wikibase Client/Lua.TASK DETAILhttps://phabricator.wikimedia.org/T143970EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: hooCc: gerritbot, Tom.Reding, Ahecht, Uzume, Anomie, hoo, Lucie, aude, daniel, Evad37, Aklapper, Lahi, Gq86, GoranSMilovanovic, lisong, QZanden, LawExplorer, Wikidata-bugs, Lydia_Pintscher, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T143970: In Lua modules, there is no way to test for validity of Wikidata entity IDs

2018-04-16 Thread Ahecht
Ahecht added a comment.
mw.wikibase.entityExists('Q404') returns falseTASK DETAILhttps://phabricator.wikimedia.org/T143970EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: hoo, AhechtCc: gerritbot, Tom.Reding, Ahecht, Uzume, Anomie, hoo, Lucie, aude, daniel, Evad37, Aklapper, Lahi, Gq86, GoranSMilovanovic, lisong, QZanden, LawExplorer, Wikidata-bugs, Lydia_Pintscher, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T143970: In Lua modules, there is no way to test for validity of Wikidata entity IDs

2018-04-12 Thread Uzume
Uzume added a comment.
Does entityExists properly handle redirects (e.g., merged entities) and if so how do we get the entity ID we are redirected to?

For example, what does mw.wikibase.entityExists(Q404) yield? and how do I find out that refers to Q395?

ThanksTASK DETAILhttps://phabricator.wikimedia.org/T143970EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: hoo, UzumeCc: gerritbot, Tom.Reding, Ahecht, Uzume, Anomie, hoo, Lucie, aude, daniel, Evad37, Aklapper, Lahi, Gq86, GoranSMilovanovic, lisong, QZanden, LawExplorer, Wikidata-bugs, Lydia_Pintscher, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T143970: In Lua modules, there is no way to test for validity of Wikidata entity IDs

2018-04-06 Thread gerritbot
gerritbot added a comment.
Change 423260 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Introduce mw.wikibase.entityExists

https://gerrit.wikimedia.org/r/423260TASK 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, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Lordiis, GoranSMilovanovic, lisong, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, Wikidata-bugs, Lydia_Pintscher, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T143970: In Lua modules, there is no way to test for validity of Wikidata entity IDs

2018-04-05 Thread gerritbot
gerritbot added a comment.
Change 423259 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Introduce mw.wikibase.isValidEntityId

https://gerrit.wikimedia.org/r/423259TASK 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, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Lordiis, GoranSMilovanovic, lisong, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, Wikidata-bugs, Lydia_Pintscher, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T143970: In Lua modules, there is no way to test for validity of Wikidata entity IDs

2018-03-31 Thread gerritbot
gerritbot added a comment.
Change 423260 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] Introduce mw.wikibase.hasEntity

https://gerrit.wikimedia.org/r/423260TASK 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, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Lordiis, GoranSMilovanovic, lisong, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, Wikidata-bugs, Lydia_Pintscher, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T143970: In Lua modules, there is no way to test for validity of Wikidata entity IDs

2018-03-31 Thread gerritbot
gerritbot added a comment.
Change 423259 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] Introduce mw.wikibase.isValidEntityId

https://gerrit.wikimedia.org/r/423259TASK 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, Lahi, Gq86, GoranSMilovanovic, lisong, QZanden, LawExplorer, Wikidata-bugs, Lydia_Pintscher, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T143970: In Lua modules, there is no way to test for validity of Wikidata entity IDs

2016-08-26 Thread hoo
hoo added a comment.

In T143970#2586090, @Anomie wrote:
In order for the error to be caught by pcall, you need to throw a Scribunto_LuaError rather than a ScribuntoException.


Good point, we might also want to do this… but if someone specifically wants to test whether an id is valid, going with pcall and getEntity seems like a lot of hassle (and it also means we load the whole entity in case it is valid, which might not be needed).TASK DETAILhttps://phabricator.wikimedia.org/T143970EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: hooCc: Anomie, hoo, Lucie, aude, daniel, Evad37, Aklapper, D3r1ck01, Izno, Wikidata-bugs, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T143970: In Lua modules, there is no way to test for validity of Wikidata entity IDs

2016-08-26 Thread Anomie
Anomie added a comment.
In order for the error to be caught by pcall, you need to throw a Scribunto_LuaError rather than a ScribuntoException.TASK DETAILhttps://phabricator.wikimedia.org/T143970EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: AnomieCc: Anomie, hoo, Lucie, aude, daniel, Evad37, Aklapper, D3r1ck01, Izno, Wikidata-bugs, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs