Bug #7198

Race condition in autocomplete.js

Added by Jesús García Crespo about 7 years ago. Updated almost 6 years ago.

Status:NewStart date:09/05/2014
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:Form validation
Target version:-
Google Code Legacy ID: Tested version:1.3.1, 2.0.0, 2.0.1, 2.1
Sponsored:No Requires documentation:

Description

autocomplete.js embeds one page for each autocomplete field in a form. When new items are added in autocomplete fields they have to be submitted within the iframe. When the main form is submitted it may happen that the child submissions have not finished yet. It's hard to reproduce but frequently you'll run into this problem if you are submitting the main form very fast after adding a new field in an autocomplete field.

The resulting error is frequently like the following:
014/09/05 16:55:53 [error] 853#0: *1706 FastCGI sent in stderr: "PHP message: PHP Fatal error: Call to a member function __get() on a non-object in /home/foo/Desktop/Projects/atom-2.1/lib/model/om/BaseObject.php on line 505" while reading response header from upstream, client: 127.0.0.1, server: _, request: "POST /index.php/foobar-archives/edit HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.atom.sock:", host: "localhost:65535", referrer: "http://localhost:65535/index.php/foobar-archives/edit"

There is probably a small fix for this but we also want to replace the iframe's approach so we'll have to balance and see what's best at this point. Debugging all the events that are happening in the underlying iframes can be complicated.

History

#1 Updated by Jesús García Crespo about 7 years ago

  • Description updated (diff)

#2 Updated by Jesús García Crespo about 7 years ago

  • Description updated (diff)

#3 Updated by Jesús García Crespo about 7 years ago

  • Description updated (diff)

#4 Updated by Jesús García Crespo about 7 years ago

  • Description updated (diff)

#5 Updated by Dan Gillean about 7 years ago

  • Description updated (diff)

See: https://projects.artefactual.com/issues/5596#note-23 for an example of where this was affecting the application, with a sample Nginx error log message posted just below.

#6 Updated by Dan Gillean about 7 years ago

  • Description updated (diff)

oops, accidentally overrode Jesus' update of the description. putting the sample error message back :)

#7 Updated by Sarah Romkey over 6 years ago

  • Target version deleted (Release 2.2.0)

#8 Updated by Jesús García Crespo almost 6 years ago

  • Assignee deleted (Jesús García Crespo)

Also available in: Atom PDF