WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years 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:

Description

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 (5)

comment:1 Otto427 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.

comment:2 Coolkevman7 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.

comment:3 markjaquith7 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?

comment:4 ryan6 years ago

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

We don't support future comments.

comment:5 Nazgul6 years ago

  • Milestone 2.5 deleted
Note: See TracTickets for help on using tickets.