Opened 5 years ago
Closed 3 years ago
#47968 closed defect (bug) (fixed)
Feed (with comments) Last-Modified header only considers latest comment date
Reported by: | xiven | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.0 | Priority: | normal |
Severity: | normal | Version: | 5.2.2 |
Component: | Feeds | Keywords: | has-patch has-unit-tests commit assigned-for-commit |
Focuses: | Cc: |
Description
Steps to reproduce:
- Create a wordpress blog
- Add a post
- Add a comment to that post
- Wait a while
- Add another post
- 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.
Attachments (3)
Change History (16)
#3
@
3 years ago
- Milestone changed from 5.9 to 6.0
5.9 Beta 1 is happening in less than 30 minutes. I'm sorry this ticket didn't get a review and testing in time. As it's a bug that was not introduced in 5.9 cycle, moving it to 6.0 to give it the time and attention it deserves.
This ticket was mentioned in Slack in #core by costdev. View the logs.
3 years ago
@
3 years ago
Updated patch with some tidying up. Splits tests, adds documentation, @covers
annotations, $message
parameters.
This ticket was mentioned in PR #2609 on WordPress/wordpress-develop by audrasjb.
3 years ago
#5
Trac ticket: https://core.trac.wordpress.org/ticket/47968
#7
@
3 years ago
- Keywords commit assigned-for-commit added
Tests are passing, self assigning for commit.
3 years ago
#10
Committed in https://core.trac.wordpress.org/changeset/53233
Updated patch with code adjustment and unit test.