https://bugzilla.wikimedia.org/show_bug.cgi?id=42060

--- Comment #2 from [email protected] 2012-11-26 16:06:12 UTC ---
I localized the actual code, and this code sequence was changed after branch
0.1 was made. I guess the old code still have a bug. The new code will cyclic
reuse missing titles and sites so it is possible to write something like

http://www.wikidata.org/w/api.php?action=wbgetitems&props=info&sites=enwiki&titles=Norge|Noreg|Norway|Norwegen

This will try the pairs
enwiki - Norge
enwiki - Noreg
enwiki - Norway
enwiki - Norwegen

and then return the found entity

<?xml version="1.0"?>
<api success="1">
  <entities>
    <entity site="enwiki" title="Norge" missing="" />
    <entity site="enwiki" title="Noreg" missing="" />
    <entity site="enwiki" title="Norwegen" missing="" />
    <entity pageid="127194" ns="0" title="Q5786" lastrevid="169682"
modified="2012-11-26T15:47:43Z" id="q5786" type="item" />
  </entities>
</api>

The original code doesn't seem to handle overflow entries very well, but the
newer code does work. In the previous case it seems like misbehaving code tried
to get undefined site ids and titles.

Especially note the following case
http://wikidata-test-repo.wikimedia.de/w/api.php?action=wbgetentities&props=info&sites=enwiki|nnwiki|nowiki&titles=Norway|Noreg|Norge

Which will report a single found entity of type item

<?xml version="1.0"?>
<api success="1">
  <entities>
    <entity pageid="127194" ns="0" title="Q5786" lastrevid="169684"
modified="2012-11-26T15:55:10Z" id="q5786" type="item" />
  </entities>
</api>

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to