Skip to:

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7718 closed defect (bug) (fixed)

Clicking message Reply button multiple times produces duplicate messages

Reported by: jdgrimes's profile jdgrimes Owned by: r-a-y's profile r-a-y
Milestone: 3.0 Priority: normal
Severity: normal Version: 1.7
Component: Messages Keywords: has-patch


I originally started investigating this due to a complaint from a client that users were posting complaining about duplicate messages being posted. I was able to reproduce this:

  1. Send a test message to yourself or somebody else.
  2. Enter a reply message.
  3. Hit the Send Reply button multiple times in quick succession.

Result: your reply will be sent multiple times. Tested on both latest stable and trunk, using 2015 and 2017 themes.

Suggested fix: the Reply button should be disabled while the Ajax request is being sent, to avoid the event callback being triggered multiple times.

Patch forthcoming.

Related: #7457. However, that ticket is about messages specifically, and not replies (which I haven't been able to reproduce).

Attachments (1)

7718.diff (844 bytes) - added by jdgrimes 6 years ago.

Download all attachments as: .zip

Change History (4)

6 years ago

#1 @jdgrimes
6 years ago

  • Keywords has-patch added

I have tested 7718.diff, and it fixes the issue.

#2 @r-a-y
6 years ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 11911:

bp-legacy: Disable "Send Reply" button onclick when replying to a private message thread via AJAX.

Previously, it was possible for a user to click on the "Send Reply" button
multiple times, causing the same reply to be duplicated several times over.

This commit addreses this by disabling the "Send Reply" button when it is
clicked and re-enables it after the AJAX request is completed.

Props jdgrimes.

Fixes #7718.

#3 @r-a-y
6 years ago

  • Milestone changed from Awaiting Review to 3.0
  • Version changed from 2.9.3 to 1.7

Thanks for the report and the patch, @jdgrimes.

I've committed the fix for v3.0 since this is a rather (embarassingly) old bug and not a regression from v2.9.

Note: See TracTickets for help on using tickets.