Page MenuHomePhabricator

Adding whitespace-only lemma makes no edit and shows no error message
Open, Needs TriagePublic


As a Wikidata editor, I want to know when my input is faulty in order to correct it.

When adding a Lemma to a Lexeme where the text is only whitespace, the edit appears to save correctly (and afterwards the language code is shown in an unusual position, since the text takes up no vertical space), but in fact no edit is made, and when reloading the page the lemma is gone.

Add a lemma with the text “ ” and any valid language code to a lexeme (e.g. L123).


Screenshot_2021-01-12 ama 𒂼.png (122×666 px, 9 KB)

GIVEN an existing lexeme
WHEN I edit the lemmas
AND add a new one
AND set the new lemma’s text to some nonempty whitespace string
AND set its language code to a valid language code for which the lexeme has no lemma yet
AND try to save the edit
THEN the an error should be reported
AND the UI should stay in edit mode

Acceptance criteria:

  • an error is reported
  • no edit is made (like currently)

Open questions:


Event Timeline

The latest changes for T250550 partially address this, in that the UI will now show the lemmas returned from the API, which won’t include the empty lemma. So you can still try to save an empty lemma, and you still won’t get an error, but at least you won’t see the weird misplaced language code after saving – instead, it’ll just vanish without a trace.