WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 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 10 years ago.
Patch for canonical.php against trunk.

Download all attachments as: .zip

Change History (13)

#1 @nacin
10 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.

#2 @nacin
10 years ago

Submitted to GCI.

#3 @kapeels
10 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?

#4 @nacin
10 years ago

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

#5 @kapeels
10 years ago

And this happens with

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

(when querying with specific tag names)

too.

#6 @ryan
10 years ago

canonical.php is redirecting back to the main feed.

#7 follow-up: @aaroncampbell
10 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.

@rfw
10 years ago

Patch for canonical.php against trunk.

#8 @rfw
10 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.

#9 in reply to: ↑ 7 @kapeels
10 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 :)

#10 @nacin
10 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.

#11 @markjaquith
10 years ago

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

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

#12 @nacin
10 years ago

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

Note: See TracTickets for help on using tickets.