Make WordPress Core

Opened 10 years ago

Last modified 6 years ago

#31935 new defect (bug)

is_page() erroneously set to true when loading /feed/ associated with 404

Reported by: danielbachhuber's profile danielbachhuber Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: Feeds Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

r29216 changed feeds to never send a 404 status header. This had the unintended consequence of changing the behavior of some internals.

A request to the feed associated with a missing page (e.g. /missing-page/feed/) will match the rewrite rule for a page and set is_page == true. I'd expect WordPress internals to still understand this request as is_404

Attachments (2)

31935.patch (431 bytes) - added by 5um17 10 years ago.
Patch checking not singular with is_feed
31935-unit-test.diff (953 bytes) - added by salcode 10 years ago.

Download all attachments as: .zip

Change History (8)

@5um17
10 years ago

Patch checking not singular with is_feed

#1 @5um17
10 years ago

  • Keywords has-patch added; needs-patch removed

This can be fixed by sending 200 status code only for home page feed. Therefore, I added !is_singular() along with is_feed()
Any other better way ?

#2 @johnbillion
10 years ago

  • Keywords needs-unit-tests added

#3 @swissspidy
9 years ago

  • Keywords has-unit-tests added; needs-unit-tests removed
  • Milestone changed from Future Release to 4.5

#4 @stevenkword
9 years ago

Relates to #30210, which is also slated for 4.5.

#5 @swissspidy
9 years ago

The unit test breaks when running the Tests_Query_VerbosePageRules tests because it assumes to be a feed for a (non-existant) category archive. Looks like that's what #30210 tries to fix.

#6 @jorbin
9 years ago

  • Milestone changed from 4.5 to Future Release

Punting this in coordination with #30210 as this relies on that and that one is blocked by #35452.

Note: See TracTickets for help on using tickets.