Opened 4 years ago
Last modified 9 months ago
#9775 reopened enhancement
Duplicate comment check is too strict
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Comments | Version: | 2.7.1 |
| Severity: | normal | Keywords: | |
| Cc: | scribu@…, skithund |
Description
The duplicate comment detection mechanism doesn't allow duplicate comments on the same post, even from the post author. That's not good.
The duplicate comment check should only block the new comment if there is no other comment posted between the new comment and the old comment.
Change History (14)
- Summary changed from Duplicate comment not allowed on same post to Improve duplicate comment detection
- Summary changed from Improve duplicate comment detection to Duplicate comment check is too strict
comment:3
follow-up:
↓ 5
Denis-de-Bernardy — 4 years ago
- Milestone changed from 2.8 to Future Release
punting to future, pending patch
Replying to Denis-de-Bernardy:
As I understand things, its main purpose is to make sure that double clicking the publish comment button won't output two comments.
Yes, I think that's it's main purpose too.
Adding a unique ID for each comment, that gets passed into the comment form, and that expires upon the comment being saved, would easily defeat this (it would probably cut a lot of spam, too). The duplicate-comment check could then be rendered obsolete, in favor of redirecting to the newly published comment itself.
The unique ID could use a mechanism similar to post-new.php that assigns a neggative ID to a post, before it is saved.
Also, this plugin implements a similar technique: http://wordpresssupplies.com/wordpress-plugins/captcha-free/
comment:6
follow-up:
↓ 7
Denis-de-Bernardy — 4 years ago
it might interfere with caching plugins however.
Replying to Denis-de-Bernardy:
it might interfere with caching plugins however.
Not if you add it dynamically through JS. But then users with JavaScript disabled can't comment.
Therefore, I still think it's a more robust ideea to check for intermediate comments before blocking.
- Type changed from defect (bug) to enhancement
comment:9
caesarsgrunt — 4 years ago
Why would you ever want to post two identical comments, even if there were other comments between them?
comment:10
josephscott — 4 years ago
I think this should be closed as invalid. Providing a way to get around the duplicate comment check is asking for problems.
comment:11
skithund — 4 years ago
- Cc skithund added
How about making the duplicate check pluggable, so people (like me) could get around it with a plugin if necessary?
comment:12
skithund — 3 years ago
- Keywords needs-patch removed
- Milestone changed from Future Release to 3.0
- Resolution set to fixed
- Status changed from new to closed
- Version changed from 2.7.1 to 3.0
comment:13
scribu — 9 months ago
- Milestone changed from 3.0 to Awaiting Review
- Resolution fixed deleted
- Status changed from closed to reopened
You can use 'comment_duplicate_trigger' only to customize the message that the user sees, after it has been decided that the comment is a dup.
Related: #21609
comment:14
SergeyBiryukov — 9 months ago
- Version changed from 3.0 to 2.7.1

It would depend on the purpose.
As I understand things, its main purpose is to make sure that double clicking the publish comment button won't output two comments. Adding a unique ID for each comment, that gets passed into the comment form, and that expires upon the comment being saved, would easily defeat this (it would probably cut a lot of spam, too). The duplicate-comment check could then be rendered obsolete, in favor of redirecting to the newly published comment itself.