WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 7 years ago

#1508 closed defect (bug) (worksforme)

permalink clash postname and post_id

Reported by: Viitoria Owned by: markjaquith
Milestone: Priority: normal
Severity: normal Version: 1.5.1.2
Component: General Keywords: dev-feedback 2nd-opinion
Focuses: Cc:

Description

When %postname% and %post_id% are defined in the permalink url, content fails to show up on the permalinked page. They refuse to work together.

Change History (5)

comment:1 markjaquith9 years ago

  • Keywords bg|dev-feedback bg|2nd-opinion added
  • Owner changed from anonymous to markjaquith
  • Status changed from new to assigned

Verified in WordPress 1.6

/%postname%/%post_id%/ doesn't work, but /%post_id%/%postname%/ does.

This likely has to do with the fact that a post like /post-name/11/ looks like the 11th page of /post-name/

comment:2 markjaquith9 years ago

We might have to just list what rewrite structures we're going to accept and which ones we won't (or can't, without making the code extremely complex.)

Reminder to self: create checkboxes of common, supported rewrite structures on Options => Permalinks and call the user-supplied permalink structure box "Custom (Advanced User s Only)" with a link to a Codex page discussing which structures will work and which won't.

comment:3 markjaquith9 years ago

Okay, Matt checked in a change that lists two commonly used permalink schemes (as bullets).

Next: create codex page discussing which permalink structures work, and which ones don't.

comment:4 rob1n7 years ago

  • Keywords dev-feedback 2nd-opinion added; permalinks bg|dev-feedback bg|2nd-opinion removed

I don't see how we can fix this, short of hacking a bit of code up. /postname/id doesn't really make sense, anyways...

comment:5 johnbillion7 years ago

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

Closing as worksforme. %postname% and %post_id% can be used together in the permalink structure. Tested on Apache and IIS with no problems.

Note: See TracTickets for help on using tickets.