SemanticMediaWiki / SemanticMediaWiki/SemanticFormsSelect
Wrong values in subfields when value is switched too quickly
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 6
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
Soemone reported a very specific issue on one of my wikis.
You can test that here: https://archi-mediawiki.netlib.re/Sp%C3%A9cial:RunQuery/Recherche_avanc%C3%A9e?uselang=fr
- Select France in the Pays field.
- With the keyboard, use the tab key to select the Ville field.
- Quickly type
stron your keyboard.
What happens then is that Strasbourg is selected but the Sous-quartier and Rue fields are populated with values from Stosswihr (the value before Strasbourg in the Ville list).
This is probably some kind of race condition because the queries are asynchronous.
I had a hard time reproducing on sandbox because you don't have so many values there, but I think I found a similar issue here: https://sandbox.semantic-mediawiki.org/wiki/Sp%C3%A9cial:RunQuery/Test_keyboard
- With the keyboard, use the tab key to select the first field.
- Quickly press down then up on your keyboard.
The second field should be empty but it is populated with values from Europe. (Probably because the query for Europe ends after the query for null.)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the race condition at the linked ArchiMediaWiki and sandbox pages using the keyboard steps, then trace the asynchronous queries that populate the dependent fields. Done means rapid changes leave the selected value and its dependent fields consistent, including leaving the second field empty when the final selection is null.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100