Race condition in autocomplete.js
|Google Code Legacy ID:||Tested version:||1.3.1, 2.0.0, 2.0.1, 2.1|
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.
#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.