[wp-trac] [WordPress Trac] #47968: Feed (with comments) Last-Modified header only considers latest comment date

WordPress Trac noreply at wordpress.org
Tue Sep 3 11:52:54 UTC 2019


#47968: Feed (with comments) Last-Modified header only considers latest comment
date
--------------------------+-----------------------------
 Reporter:  xiven         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Feeds         |    Version:  5.2.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 **Steps to reproduce**:
 1. Create a wordpress blog
 2. Add a post
 3. Add a comment to that post
 4. Wait a while
 5. Add another post
 6. Check the Last-Modified header of the blog's feed

 **Expected result**:
 The Last-Modified header should have the date/time of the post added in
 step 5.

 **Actual result**:
 The Last-Modified header has the date/time of the comment added in step 3.
 This behaviour breaks caching and causes feed readers to believe there is
 no new content even when there might be new posts.

 **Analysis**:
 The fault lies in the send_headers function of class-wp.php. For a feed
 including comments it should use the ''newest'' date from ''both'' the
 get_lastcommentmodified and the get_lastpostmodified functions instead of
 only using the result from the get_lastcommentmodified function.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47968>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list