WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 17 months ago

#34775 new enhancement

Comments update last-modified

Reported by: inetbizo Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Comments Keywords: 2nd-opinion
Focuses: Cc:

Description

When a comment record is added to a page or post id, update the last-modified timestamp as this creates additional content on the page.

Change History (8)

#1 @johnbillion
3 years ago

  • Keywords needs-patch 2nd-opinion added
  • Version 4.3.1 deleted

#2 @rachelbaker
3 years ago

  • Keywords reporter-feedback added; needs-patch removed

@inetbizo Can you clarify which last-modified timestamp you are suggesting should change (the Post or the Comment)?

#3 @inetbizo
3 years ago

@rachelbaker which timestamp sql record is used for the HTTP packet header last-modified if sent at all? If it's the post then use that one if it reads the last approved comment date then fine. Search engines ignore

#4 @SergeyBiryukov
3 years ago

  • Keywords reporter-feedback removed
  • Type changed from feature request to enhancement

When a comment record is added to a page or post id, update the last-modified timestamp as this creates additional content on the page.

That's how it currently works since [4483], but the Last-Modified header is only sent for feeds by default: tags/4.4/src/wp-includes/class-wp.php#L392.

Last edited 3 years ago by SergeyBiryukov (previous) (diff)

#5 @inetbizo
3 years ago

@SergeyBiryukov [RFC2616]http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html That last-modified HTTPD header packet.

This ticket was mentioned in Slack in #core-comments by rachelbaker. View the logs.


2 years ago

#7 @dshanske
2 years ago

Being as there is currently no last modified date on comments(See #36564 for that suggestion), perhaps updating a comment attached to a post should update the last modified field for the post itself, as the comment is part of the post.

#8 @swissspidy
17 months ago

Related: #24266.

[…] as this creates additional content on the page.

In a REST API context for example, this wouldn't be 100% true anymore, so I don't think updating the post's modified date is the best idea.

And since Last-Modified is only served for feeds, so I'm not sure this behaviour should change here.

Note: See TracTickets for help on using tickets.