Make WordPress Core

Opened 19 years ago

Closed 17 years ago

#1231 closed defect (bug) (fixed)

Can't use feed names as a slug with some permalink structures

Reported by: raena's profile raena Owned by: markjaquith's profile markjaquith
Milestone: 2.1 Priority: high
Severity: blocker Version: 2.0.1
Component: Administration Keywords: has-patch commit
Focuses: Cc:

Description

If you have date-based permalinks like yyyy/mm/dd/slug, and your slug happens to be the name of a feed, someone clicking its permalink will see a feed instead of the post.

You can see this in action on this post of Matthew Thomas', here:
http://mpt.net.nz/?p=36

The proper permalink for this can be seen in the URL on the headline, which is:
http://mpt.net.nz/archive/2004/09/30/atom

But clicking it gets an Atom feed for September 30th.

His site still uses an alpha from 1.3, but I've replicated this on a 1.5 install.

Attachments (1)

do-not-feed-the-post-title.diff (937 bytes) - added by skeltoac 17 years ago.

Download all attachments as: .zip

Change History (10)

#1 @raena
19 years ago

  • Patch set to No

#2 @markjaquith
18 years ago

  • Keywords bg|needs-patch bg|dev-feedback added
  • Milestone set to 2.1
  • Owner changed from anonymous to markjaquith
  • Priority changed from normal to high
  • Severity changed from minor to blocker
  • Status changed from new to assigned
  • Version set to 2.0.1

Eek! Still valid for WP 2.0.1

Recreation:

  1. /%year%/%monthnum%/%day%/%postname%/ as permalink style
  2. Create new entry with "Atom" as title
  3. Access the entry
  4. Get offered an atom feed to download

#3 @darkfate
18 years ago

Maybe wordpress shouldn't allow you to have a slug with that name.

#4 @foolswisdom
17 years ago

Hi Mark,

This is currently the only "blocker" bug open ;-)

Are you waiting on dev-feedback before preparing a patch? Is there something else needed before pursuing further? Is the bug really blocker?

#5 @skeltoac
17 years ago

  • Keywords has-patch added; bg|needs-patch bg|dev-feedback removed

Try this on for size.

#6 @markjaquith
17 years ago

  • Keywords commit added

I like Skeltoac's fix. That should do it.

#7 @ryan
17 years ago

We have a list of feeds in $wp_rewrite->feeds.

#8 @skeltoac
17 years ago

Updated to use $wp_rewrite->feeds

#9 @ryan
17 years ago

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

(In [4199]) Don't allow pages to have the same names as feeds to avoid rewrite collision. Props skeltoac. fixes #1231

Note: See TracTickets for help on using tickets.