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

Partial Fix Posts added after page load appear twice

Discussion in 'Resolved Bug Reports' started by Jon W, Mar 24, 2015.

  1. Jon W

    Jon W Well-Known Member

    This is only likely to happen on really slow internet connections. To replicate, enable debug mode and in Debug Options set "Slow POST Responses" to a high number (like 5).

    You will need two separate windows open with different users logged in viewing the same thread.

    1. User A opens the thread.
    2. User B opens the same thread and creates a post in it.
    3. User A starts typing a post and clicks "save draft" (or allows it to autosave).
    4. User A is alerted that a post has been made.
    5. User A finishes their post and clicks "Post Reply".
    6. User A then clicks the link to see the posts made since they opened the thread.

    After a few seconds, both posts by User A and User B appear twice!

    I think the solution to this is probably to remove the "Messages have been posted since you loaded this page." message as soon as "Post Reply" is clicked, rather than waiting for the AJAX response.
     
  2. Jon W

    Jon W Well-Known Member

    Just realised, steps 5 and 6 can be switched round and it still happens, which then means that my proposed solution doesn't work.
     
  3. Jon W

    Jon W Well-Known Member

    Also it is possible to click the link several times if you are impatient.
     
  4. Mike

    Mike XenForo Developer Staff Member

    I've adjusted the system to hide the message more quickly when clicking post reply and I've prevented the "view them" link from being clicked multiple times (while the request was pending).

    Handling this the other way (clicking the link with the pending request and then clicking post reply) isn't something I'm going to make changes for at this time.
     

Share This Page