Ticket #1231 (closed defect (bug): fixed)

Opened 7 years ago

Last modified 5 years ago

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

Reported by: raena Owned by: markjaquith
Priority: high Milestone: 2.1
Component: Administration Version: 2.0.1
Severity: blocker Keywords: has-patch commit
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

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

Change History

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

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

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

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?

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

Try this on for size.

  • Keywords commit added

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

comment:7   ryan5 years ago

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

Updated to use $wp_rewrite->feeds

comment:9   ryan5 years ago

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

(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.