Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-10957

double posts resulting from topic review and forum hang

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • 3.1.12-RC1
    • 3.0.10
    • Posting
    • None

      On my forum, posts sometimes hang for a bit when submitted (I'm not sure if this is traffic on the server end or slow internet connections on the client end). I have topic review enabled and posters get post review warnings if a post has been submitted in a topic after the time the user begins a reply. I am finding that people are inadvertently double or triple posting when a submitted reply hangs and when I ask them what they did they report that their first reply gave them a post review warning (presumably of their own reply that had just been made since there are usually no other replies made shortly before the reply in question) and when they click submit they notice that they have double posted. I took a look at the code and I see that a user gets a post review warning even if that user is the one that submitted the intervening reply. So I am guessing that the following happens:

      • user submits a reply
      • submit_post() is called and the new reply is inserted into the db
      • forum hangs for a bit before the browser is successfully redirected
      • user gets confused and clicks submit a second time, which takes the user back to posting.php
      • posting.php sees that the last_post_id has changed since the user began (because the user's reply was already inserted into the db) and thus gives user a post review warning
      • as a result the code never gets to the typical flood limit that would block the second post
      • user scratches his head (taking him beyond the flood limit) and then clicks submit and the reply is re-posted

      Does this make sense or do I have this wrong?

      If this is right, one way to address it would be to change the if statement that checks for an intervening reply so that it only triggers a post review warning if the last poster id for the topic is different from the user_id for the posting user. If that were done, the second submit woule probably be stopped by the flood limit.

            CHItA CHItA
            asinshesq asinshesq [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: