WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 4 years ago

#7532 new enhancement

Need comment_modified_date_gmt for approvals and edits

Reported by: lapcat Owned by:
Priority: low Milestone: Future Release
Component: Comments Version: 2.6
Severity: minor Keywords: needs-patch
Cc:

Description

Summary:
Currently there is only one date field for comments, comment_date_gmt. This is insufficient, because it represents only the creation date, not the approval date. The function get_lastcommentmodified can only check comment_date_gmt, which means that it can return an earlier date than the approval date. This can lead to RSS feeds wrongly returned HTTP 304 Not Modified responses. There needs to be comment_modified_date_gmt in addition to comment_date_gmt.

Steps to Reproduce:
(1) First comment is submitted.
(2) First comment is mistakenly marked as spam by Akismet.
(3) Second comment is submitted and posted.
(4) Check comments feed in RSS reader. Second comment appears in feed, first comment does not.
(5) Mark first comment as not spam.
(6) Check comments feed in RSS reader again.

Expected results:
Comments feed returns HTTP 200, because there is a new comment in the feed.

Actual results:
Comments feed returns HTTP 304.

Notes:
The same bug could occur in other circumstances. For example, if a comment was held for moderation.

Change History (5)

comment:1 matt5 years ago

  • Milestone changed from 2.7 to 2.8

comment:2 ryan4 years ago

  • Component changed from General to Comments
  • Owner anonymous deleted

comment:3 Denis-de-Bernardy4 years ago

  • Keywords needs-patch added
  • Milestone changed from 2.8 to Future Release

comment:4 Denis-de-Bernardy4 years ago

Alternatively, we could use the post's last modified date, and make sure it get updated when a comment is approved or unapproved.

comment:5 Denis-de-Bernardy4 years ago

  • Priority changed from normal to low
  • Severity changed from normal to minor
  • Type changed from defect (bug) to enhancement
Note: See TracTickets for help on using tickets.