Please see the attached screenshot. The error message is for a previously entered username. This is because the previous AJAX call took longer to process (5.48 second) than the one that came after it (4.51 seconds). The javascript that displays the error messages takes the last response it gets and displays it which in this case was not the latest information.

The fix would be to include a timestamp with each AJAX request and include the same timestamp in the JSON response. When the javascript recieves a new response it should then check that the timestamp of the new information is later than the timestamp of the current information it is displaying or discard the response.

CommentFileSizeAuthor
uername_check_bug.png52.69 KBedeverett
Members fund testing for the Drupal project. Drupal Association Learn more