Page MenuHomePhabricator

Prevent inserting Strings in Qid fields
Open, Needs TriagePublicBUG REPORT


List of steps to reproduce (step by step, including full links if applicable):

  • Take a speaker element from the Wikibase, e.g. this one
  • take a field from this element (ex. P 14 "place of residence" or P 12 "Wikidata Id"). These fields are supposed to contain only Qid from Wikidata
  • Try to type in the field something different than an Qid.

What happens?:
It is possible to save the new string entered as the value, when it shouldn't be allowed (a string in a wikidata URL is useless).

What should have happened instead?:
The "submit" button should not be reachable, just like when you try to replace the value of the following fields of an element with a random string.

  • Instance of
  • Subclass of
  • Language
  • Speaker


Event Timeline

The difference comes from the datatype of the properties: P2 (instance of) has the Item datatype so the Wikibase checks that the value that is entered is an item; P12/P14 have the external identifier datatype. So the a priori check cannot be done. On Wikidata, there is the constain system that allow to check a posteriori that the values are correct (or at least look correct).
I do not know whether we can use the constrain system on the LinguaLibre Wikibase (@VIGNERON ?) but I think we cannot do better because this is how the Wikibase works.

Poslovitch moved this task from Backlog to UI, Gadgets on the Lingua Libre board.

I think it would require the installation of

I'll see what I can do this week-end.