Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 18 months ago

#4543 closed defect (bug) (wontfix)

Future comments are displayed. They must not.

Reported by: Coolkevman Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.2.1
Component: General Keywords: comment, timestamp, date, time, edit
Focuses: Cc:


An administrator (or someone with similar capabilities) is allowed to edit a comment timestamp. But if the timestamp is set to the future, the comment will still appear below a post.

This is the wrong behaviour since we expect, like posts, to have the comment visible only after the current time exceed the comments timestamp.

I think a solution is to alter the SQL queries of the comments_template() function from the /wp-includes/comment-template.php file.

Change History (6)

#1 @Otto42
13 years ago

That whole chunk of SQL needs to be pulled out of there and into the main wpdb stuff anyway. Just my 2 cents.

#2 @Coolkevman
13 years ago

Looks like it's a little bit more complicated...

As explained in comments_template() code, this function must use standard WP API instead of raw SQL queries. I think "API" mean "get_approved_comments() function" from the /wp-includes/comment.php file.

If I'm not wrong, the solution is then to modify the latter to filter on dates and rewrite comments_template() to use it instead of SQL queries.

#3 @markjaquith
13 years ago

  • Milestone changed from 2.3 (trunk) to 2.4 (future)

Comment timestamps can only be edited after they are submitted. So they'll be "in the present" when originally submitted. What is the point of pushing them to the future? Isn't the cat already out of the bag at that point?

#4 @ryan
13 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

We don't support future comments.

#5 @Nazgul
13 years ago

  • Milestone 2.5 deleted

#6 @earnjam
18 months ago

#43855 was marked as a duplicate.

Note: See TracTickets for help on using tickets.