XF 1.5 deferred.php hanging

MattW

Well-known member
I've been trying to help get to the bottom of a double posting issue, and we've been able to reproduce it. It's happening when deferred.php is being called, and it's causing the browser to lock, and just display the loading icon in the top right. People are then posting again, causing a double post. If you refresh the page, the post has been submitted, and also a draft copy saved in the editor.

I've removed all the code from the templates (public and admin) to trigger deferred.php, and run it from a cron. I'm still seeing it being called though when posting messages:
Code:
MYIP - - [29/Jun/2016:00:01:52 -0400] "POST /talk/threads/new-test-thread.155136/add-reply HTTP/1.1" 200 2494 "http://www.hearth.com/talk/threads/new-test-thread.155136/page-2" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Ge
cko/20100101 Firefox/47.0"
 MYIP - - [29/Jun/2016:00:01:53 -0400] "POST /talk/deferred.php HTTP/1.1" 200 22 "http://www.hearth.com/talk/threads/new-test-thread.155136/page-2" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0"

What else could be calling deferred.php, and is there any way to try and figure why it's stalling in the browser?

The server itself isn't running into any resource issues, load is always below 1, and PHP has enough time allocated to run (300 seconds), along with a high enough memory limit.
 
  • Like
Reactions: Xon
Deferred.php is loaded from the JS automatically when needed. In this case, it probably indicates that there were entries added to the mail queue that need to be sent.

The trigger is after the response from the server is returned, so you'll want to look into JS errors that are happening in this case I think. The deferred calls won't create any sort of Ajax loading indication.
 
It's to do with the responsive ad code I think.

It's trying to calculate the width of the post before it is visible hence its getting a width of 0.

Really not a lot I can suggest to fix it other than wrapping the JS in a conditional so it bails out gracefully if it detects a 0 width.
 
Thanks Chris and Mike. I've passed the info to Jim, and he might need to raise the issue with Themehouse, as he's using their monetize pro addon to serve the ads.
 
Looking into this it seems to come up when the post is rendered via javascript on the quick reply. Is there any variable available in the template to determine if the post is coming from actionShowNewPosts after a quick reply?
 
Back
Top Bottom