1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 deferred.php hanging

Discussion in 'Troubleshooting and Problems' started by MattW, Jun 29, 2016.

  1. MattW

    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.
     
    Xon likes this.
  2. Mike

    Mike XenForo Developer Staff Member

    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.
     
  3. MattW

    MattW Well-Known Member

    Can't seem to really find anything, and it's still happening

    upload_2016-6-29_17-50-48.png

    upload_2016-6-29_17-54-15.png

    I'm not sure if his is ad related or not (amazon)??
     
  4. MattW

    MattW Well-Known Member

    Replicated it again, getting js errors due to ads.

    upload_2016-6-29_18-4-11.png
     
  5. MattW

    MattW Well-Known Member

    upload_2016-6-29_18-11-46.png
    Got it again, so it's definitely ad related.
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
  7. MattW

    MattW Well-Known Member

    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.
     
  8. Jake B.

    Jake B. Well-Known Member

    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?
     
  9. Chris D

    Chris D XenForo Developer Staff Member

    No don't think so but you could set one.
     

Share This Page