WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#14288 closed defect (bug) (fixed)

Category RSS feeds in querystring format return wrong feed

Reported by: mirmillo Owned by: MarkJaquith
Milestone: 3.1 Priority: low
Severity: normal Version: 3.0
Component: General Keywords: needs-patch gci
Focuses: Cc:

Description

In WordPress 3, using category specific RSS feeds in query string format as shown the first example here: http://codex.wordpress.org/WordPress_Feeds#Categories_and_Tags. WordPress returns the general site RSS feed.

For example:

http://mirmillo.com/?cat=9&feed=rss2

http://ryan.boren.me/?cat=1517&feed=rss2

Returns the main site feed no matter which feed format you are using.

Attachments (1)

canonical_trunk.diff (3.1 KB) - added by rfw 4 years ago.
Patch for canonical.php against trunk.

Download all attachments as: .zip

Change History (13)

comment:1 @nacin5 years ago

  • Keywords needs-patch gci added; rss category removed
  • Milestone changed from Awaiting Review to 3.1
  • Priority changed from normal to low

Looks legit.

Can be punted without a patch in a week.

comment:2 @nacin4 years ago

Submitted to GCI.

comment:3 @kapeels4 years ago

  • Cc kapeel.sable@… added
  • Owner set to kapeels
  • Status changed from new to assigned

This seems to happen only when permalinks are disabled.

Could anybody check?

comment:4 @nacin4 years ago

Correct. I reproduced it only in that instance. The title says when using the query string format.

comment:5 @kapeels4 years ago

And this happens with

http://ryan.boren.me/?tag=test&feed=rss2

(when querying with specific tag names)

too.

comment:6 @ryan4 years ago

canonical.php is redirecting back to the main feed.

comment:7 follow-up: @aaroncampbell4 years ago

I haven't tested this, but I was helping the student working on it for GCI in IRC. At first he wasn't able to reproduce it. After reading the description and clicking the links above, I told him it sounded like he probably needed to have permalinks enabled but use the query string notation to try to access it. Once he enabled permalinks he could reproduce it easily.

I only mention this because @kapeels says "seems to happen only when permalinks are disabled" and that seems to be incorrect.

@rfw4 years ago

Patch for canonical.php against trunk.

comment:8 @rfw4 years ago

  • Owner changed from kapeels to rfw
  • Status changed from assigned to accepted

Uploaded canonical_trunk.diff, which patches canonical.php to remove $paged_redirect and use $redirect.

This also resolves failures when using paged=? in the query string.

comment:9 in reply to: ↑ 7 @kapeels4 years ago

Replying to aaroncampbell:

I haven't tested this, but I was helping the student working on it for GCI in IRC. At first he wasn't able to reproduce it. After reading the description and clicking the links above, I told him it sounded like he probably needed to have permalinks enabled but use the query string notation to try to access it. Once he enabled permalinks he could reproduce it easily.

I only mention this because @kapeels says "seems to happen only when permalinks are disabled" and that seems to be incorrect.

I think somebody misunderstood :D

What I said was - this error could be reproduced only when permalinks ARE enabled. If you don't have permalinks enabled, you aren't redirected anywhere, but shown the site feed properly :)

comment:10 @nacin4 years ago

  • Owner changed from rfw to MarkJaquith
  • Status changed from accepted to assigned

Patch works. Looks good, though we will need review from Mark Jaquith for the original purpose of paged_redirect and whether this will introduce any problems that the original route aimed to solve.

comment:11 @markjaquith4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [16920]) Fix canonical paged/feed redirects. props rfw. fixes #14288

comment:12 @nacin4 years ago

(In [16928]) Remove redundancy. see #14288.

Note: See TracTickets for help on using tickets.