iD icon indicating copy to clipboard operation
iD copied to clipboard

Wikidata field search does not include given wikidata id

Open tordans opened this issue 3 years ago • 3 comments

URL

https://www.openstreetmap.org/node/6879076447

How to reproduce the issue?

  1. Edit https://www.openstreetmap.org/node/6879076447
  2. Add Wikidata preset field
  3. Paste Q44077452 image ==> Issue: The pasted wikidata id is not part of the search results. I cannot add this explicit wikidata data item id this way (both enter or leaving the field via mouse empties the input again). Possible Solution: (a) maybe the search can be fixed; (b) add and option to the dropdown saying "choose the ID I wrote/pasted" (maybe only if the pasted text is an Q123-ID.

For comparison:

  1. Edit https://www.openstreetmap.org/node/6879076447
  2. In the raw tag editor, add "wikidata=Q44077452"
  3. In the presets, the correct data item id + information with name "Stolperstein für …" shows up

Screenshot(s) or anything else?

No response

Which iD Editor versions do you see the issue on?

Released version at openstreetmap.org/edit

Which browsers are you seeing this problem on?

Chrome

tordans avatar Dec 26 '21 21:12 tordans

For some reason, I’m unable to reproduce this issue in Firefox with Q44077452. I also tried a few other QIDs like Q5123133 and Q60788603.

Q44077452

Regardless, I agree that any input resembling a QID should just be accepted as a value, regardless of whether it resolves to an item.

1ec5 avatar Dec 26 '21 22:12 1ec5

I looked into it again, and I think there is something going on with a default Wikidata search based on the name tag. And I assume there is some kind of issue with me pasting the QID and the name based search which is maybe still running?

There is this search based on the name-tag.

https://www.wikidata.org/w/api.php?action=wbsearchentities&format=json&formatversion=2&language=de&limit=10&origin=*&search=Wolfgang%20Linke&type=item&uselang=de

And this search, when I paste the QID (in a case when it actually works):

https://www.wikidata.org/w/api.php?action=wbsearchentities&format=json&formatversion=2&language=de&limit=10&origin=*&search=Q44077452&type=item&uselang=de

There is also https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&formatversion=2&ids=Q44077452&languagefallback=1&languages=de%7Cen&origin=*&props=labels%7Cdescriptions%7Cclaims%7Csitelinks&sitefilter=dewiki%7Cenwiki which happens right when I first load the editor, probably what fills the fields.

Right now, I cannot reproduce the issue anymore. So if no one else can reproduce it, we can close this as some kind of race condition edge case.

tordans avatar Dec 27 '21 19:12 tordans

To reproduce:

  1. Click on the wikidata field
  2. Paste qid from clipboard
  3. Single-item result for pasted qid appears
  4. It is replaced by search results

Screen Recording 2022-08-14 at 12.45.06 PM.webm

jleedev avatar Aug 14 '22 17:08 jleedev