Page MenuHomePhabricator

Gloss not always saved with the right language code
Open, Needs TriagePublic

Description

To reproduce:

  • Start adding a sense
  • Enter a valid language code in the language field
  • Tab to the gloss field and enter some text
  • Tab back to the language field
  • Change the language code and immediately press enter
  • It happens on several versions of Chromium and Vivaldi as well as Edge.
  • It is saved correctly on Firefox 62.0.3 and Chrome 70.0.3538.77

Expected result: If the new language code is valid, save the sense using that language code. If the new language code is not valid, display an error and refuse to save.
Actual result: Sense is saved using the original language code. The newly added sense is displayed using the second language code the user entered, so the problem does not become apparent until the page is refreshed or the history is checked.

Peek 2018-10-22 09-54.gif (954×1 px, 121 KB)

Event Timeline

I cannot reproduce this. I tried on test and wikidata too. Can you please send it here the test you did?

Sorry, I don't understand what you're asking me to do.

What was the name of lexeme where you tried to add the sense and the language was not saved properly?.

I can repeat this. I've added a screen cap for it on test.wikidata.org to the description.

Note: if you tab out of the language code box the feature works as expected. i.e. the new language is correctly displayed before and after refresh

Thank you Tarrow, Yes, thats what happen in all of my test, but what i cannot reproduce is this this:
Actual result: Sense is saved using the original language code. The newly added sense is displayed using the second language code the user entered, so the problem does not become apparent until the page is refreshed or the history is checked.

That's interesting; so for you it's not like the gif I added? What happens? Does it correctly show and save the second code? Or just display and save the 1st?

It happens on any lexeme for me, e.g. I did it twice on https://test.wikidata.org/wiki/Lexeme:L1. Both times I entered "en" and changed it to "de" and it saved it as "en". After saving, the page initially looked correct (displayed "de"), it's only when I refresh the page that it shows what it actually saved ("en").

I'm able to reproduce it in several versions of Chromium and Vivaldi as well as Edge. I haven't tried Firefox.

so for you it's not like the gif I added? What happens?

No, what I'm saying is that it happens just like in your gift, so it is saved the second language. And never the first one. Tried it on Chrome and Firefox.
But when I tried on Edge and Chromium, it happened just as claimed by Nikki, so he is right, its a browser related problem.

Lydia_Pintscher subscribed.

I can reproduce it as well in Chrome.

Lydia_Pintscher renamed this task from Sense not always saved with the right language code to Gloss not always saved with the right language code.Jan 4 2019, 1:41 PM