Page MenuHomePhabricator

When adding statements, some items won't resolve to their labels after being selected, display QNumber instead.
Closed, ResolvedPublicBUG REPORT

Description

Problem:
Since 2022-04-07, when selecting some Item values in statements on Wikidata, the ID instead of the lable is shown after selecting the Item value.

Screenshots/mockups:

  1. Start a statement

image.png (104×697 px, 7 KB)

  1. Select an item

image.png (103×712 px, 7 KB)

  1. QNumber displays instead of label

image.png (103×359 px, 2 KB)

  1. After save we see the label as expected.

image.png (53×341 px, 2 KB)

Acceptance criteria:

  • Labels for values are shown when an Item value is selected in a statement

Note:

  • Nikki has an idea about what is wrong in T306214#7856786
  • It is now happening for every Property. It might be restricted to Properties that have value suggestions like P21.

Related Objects

Mentioned Here
P21 bla.yaml

Event Timeline

  • Select the property P21 and it will show you a list of suggestions.
  • Press the down arrow to go through the suggestions and it will show the ID in the input field for each one.
  • Type "male" and it will do a search.
  • Press the down arrow to go through the suggestions again and it will show the ID for the ones that were already shown before (loaded from the suggestions) and the label for the ones that weren't (loaded from the search).

It seems like this function is the problem? https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/master/view/resources/jquery/wikibase/jquery.wikibase.entityselector.js#531
It only checks entityStub.label. The search results have entityStub.label and entityStub.display.label so it works fine, but the suggestions only have entityStub.display.label which makes it fall back to the ID.

Change 784237 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Use new display part in entity selector some more

https://gerrit.wikimedia.org/r/784237

Change 784237 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Use new display part in entity selector some more

https://gerrit.wikimedia.org/r/784237

Seems to be resolved now, following the reproduction steps in the task description.