Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#30085 closed enhancement (duplicate)

get_lastpostmodified() is not affected by post meta

Reported by: wonderboymusic's profile wonderboymusic Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: needs-patch
Focuses: Cc:

Description

I noticed this when studying the WP-API: the meta for a post could be updated, but the Last-Modified HTTP header for the feed won't change.

Should updating meta affect post_modified(_gmt)? If so, should it only be for public meta?

This is not a caching issue, because Invalidating the cache won't matter unless this change is made, because get_lastpostmodified() only looks at the post fields, which currently won't change.

This issue is especially prescient for custom post types that may be storing most of their data attributes in meta.

Change History (3)

#2 @rmccue
9 years ago

Just to note: we're going to remove the Last-Modified header completely here, because we can't make assertions about it when we don't really know. That said, adding this wouldn't mean we could add it back, as there are other objects.

There's also a possible privacy concern by leaking when meta was updated via the post update time, as it could happen even for non-visible meta.

That said, I don't think it's a bad idea to add a method to do this. We've run into it a few times with other projects.

#3 @johnbillion
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #24266.

Note: See TracTickets for help on using tickets.