Last modified: 2014-02-24 22:21:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T48690, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46690 - Duplicate thank you allowed
Duplicate thank you allowed
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Thanks (Other open bugs)
master
All All
: High normal with 1 vote (vote)
: ---
Assigned To: Erik Bernhardson
: patch-need-review
: 46820 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-29 11:28 UTC by Nemo
Modified: 2014-02-24 22:21 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nemo 2013-03-29 11:28:51 UTC
It's fun to be thanks for a revert by the reverted editor, but not two times.
See attachment 12003 [details].
Comment 1 Alex Monk 2013-04-03 01:07:17 UTC
*** Bug 46820 has been marked as a duplicate of this bug. ***
Comment 2 Ryan Kaldari 2013-04-25 00:55:44 UTC
There are 2 different ways we could solve this without spamming the database:

Client-side:
When the ajax request for the thanks action completes, store the rev_id in a session cookie. When the history or diff page is loaded, have it check against the rev_ids in the user's session, and set the links appropriately (either a non-linking 'thanked' or a linked 'thank').

Server-side:
When the Thanks API completes the thank action store the rev_id in the user's memcached store. In the insertThankLink hook, check the memcached store for that rev_id and set the links appropriately.
Comment 3 Steven Walling 2013-04-25 01:02:49 UTC
(In reply to comment #2)
> There are 2 different ways we could solve this without spamming the database:
> 
> Client-side:
> When the ajax request for the thanks action completes, store the rev_id in a
> session cookie. When the history or diff page is loaded, have it check
> against
> the rev_ids in the user's session, and set the links appropriately (either a
> non-linking 'thanked' or a linked 'thank').
> 
> Server-side:
> When the Thanks API completes the thank action store the rev_id in the user's
> memcached store. In the insertThankLink hook, check the memcached store for
> that rev_id and set the links appropriately.

The session cookie storage solution isn't permanent, but it prevents immediate duplicates by confused users who have refreshed the page or hit Back/Forward. This is a pretty critical enhancement, so even if that's not perfect, getting something out soon to fix this should be a priority IMO.
Comment 4 MZMcBride 2013-04-25 01:06:42 UTC
Relatedly: can I un-thank someone?
Comment 5 Ryan Kaldari 2013-04-25 01:13:47 UTC
MZMcBride: No, there's no way to un-thank. Keep in mind that all notifications can also send emails (if users opt into it), and there's no way to unsend an email (not counting Microsoft Exchange).
Comment 6 Gerrit Notification Bot 2013-04-25 20:46:16 UTC
Related URL: https://gerrit.wikimedia.org/r/60914 (Gerrit Change I976cd8fbf00856c67b77daeb0d0a952efb371661)
Comment 7 MZMcBride 2013-04-26 02:32:43 UTC
(In reply to comment #4)
> Relatedly: can I un-thank someone?

The general Thanks workflow is being discussed at bug 47658.
Comment 8 Technical 13 2013-06-03 17:30:59 UTC
(In reply to comment #5)
> MZMcBride: No, there's no way to un-thank. Keep in mind that all
> notifications can also send emails (if users opt into it), and there's no way
> to unsend an email (not counting Microsoft Exchange).

I think we all understand that.  The question is, what is the immediacy to send the email in the first place?  Would it be much of a load on the system to hang on to the thank for 30-60 seconds before sending the email to offer that amount of time to realize the error and undo it?
Comment 9 Technical 13 2014-02-24 18:28:29 UTC
I believe I double thanked Scott Martin the other day for https://en.wikipedia.org/w/index.php?title=User_talk:Technical_13&diff=594071365&oldid=594071255

I thanked him once from the page history, once from the revision history (comparison page), and I actually just thanked him again from the page history (which shows up https://en.wikipedia.org/w/index.php?title=Special:Log&type=&user=Technical_13&page=User%3AScott_Martin&tagfilter=&hide_patrol_log=1&hide_review_log=1&hide_thanks_log=0 ).

So, I'm not sure if it is a lack of the ability for the system to know that I've already thanked for this edit (bug 49087) and if so, it should be a new ticket, or if it was an oversight as part of this bug and as such I've reopened this bug hoping for advice.
Comment 10 Ryan Kaldari 2014-02-24 20:59:23 UTC
@Technical 13: According to the logs you did not double thank Scott on the same day. You thanked him once on the 22nd and once on the 24th. The second thanks must have either been for a separate revision of performed during a separate session. Otherwise, it would not have been successful. Thanking someone twice for the same edit from two separate sessions takes a very conscious effort on the part of the thanker, so I'm not sure there is any real bug here. Preventing all possible stupid actions from editors via software is a sure way to make your software bloated and unmaintainable. For example, we could prevent users from sending the same email message to the same user twice, but that would be pretty silly.
Comment 11 Scott Martin (http://enwp.org/user:scott) 2014-02-24 21:34:17 UTC
Ryan is correct, I got a notification on the 22nd and then again today.
Comment 12 Andre Klapper 2014-02-24 21:55:58 UTC
I'm re-closing this ticket as it works in 99% of the cases. 
If preventing double-thanking on different days is really wanted, please create a separate enhancement request.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links