Last modified: 2012-02-10 19:22:31 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 T28684, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26684 - Deleting a reply and replying again merges history, restoring causes database error
Deleting a reply and replying again merges history, restoring causes database...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
LiquidThreads (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-12 06:29 UTC by Nikola Kovacs
Modified: 2012-02-10 19:22 UTC (History)
3 users (show)

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


Attachments
proposed patch (578 bytes, patch)
2011-01-15 08:31 UTC, Nikola Kovacs
Details

Description Nikola Kovacs 2011-01-12 06:29:34 UTC
I created a thread here: http://liquidthreads.labs.wikimedia.org/wiki/Thread:Talk:LiquidThreads_testing/Deletion_test

I replied and deleted the reply, then I replied again. Both my replies were named "Thread:Talk:LiquidThreads_testing/Deletion_test/reply" and as a result their edit history is now merged. If you go to 
http://liquidthreads.labs.wikimedia.org/w/index.php?title=Thread:Talk:LiquidThreads_testing/Deletion_test/reply&action=history and you are a sysop, you'll see that there's a deleted revision.

Attempting to restore the deleted revision causes a database error in function "Thread::save/Thread::commitRevision/Thread::undelete": "1062: Duplicate entry '3527' for key 2 (10.0.6.27)".

However, even if this were fixed, you would not be able to properly restore a deleted reply once another reply has taken its place. LQT would need to take into account deleted replies when it comes up with the automatic titles for comments to avoid merging them like this.
Comment 1 Nikola Kovacs 2011-01-15 08:31:07 UTC
Created attachment 7995 [details]
proposed patch

This simple patch to Threads::incrementedTitle also checks deleted replies when trying to determine a title for a new thread. I haven't done any extensive testing, but in theory it shouldn't break anything, since it's equivalent to first adding a new reply then deleting the existing one instead of the other way around.
Comment 2 p858snake 2011-04-30 00:08:52 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 3 Andrew Garrett 2012-02-10 19:22:31 UTC
Thanks a lot for the patch, Nikola. I appreciate your help.

I've applied it in r111182.

Marking RESOLVED FIXED.

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


Navigation
Links