Make WordPress Core

Opened 18 years ago

Closed 17 years ago

#2245 closed defect (bug) (fixed)

permalinks broken with "/%category%/%postname%"

Reported by: jdub's profile jdub Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: General Keywords:
Focuses: Cc:

Description

Here's a nasty one. With "/%category%/%postname%" as my permalink structure, I can't show individual posts via their permalinks. Here's what the dump plugin tells me (let me know if you need more):

REQUEST_URI: /blog/projects/gnome/1136292345
WP Query String: page=%2F1136292345&name=gnome&category_name=projects
WP_Query Query String: page=%2F1136292345&name=gnome&category_name=projects

The post is in a nested category (projects/gnome), but 'gnome' is interpreted as the name for some reason. Oddly enough, if I add a full stop to the end of the URL, it is all interpreted correctly. Here's what the dump says now:

REQUEST_URI: /blog/projects/gnome/1136292345.
WP Query String: name=1136292345.&category_name=projects%2Fgnome
WP_Query Query String: name=1136292345.&category_name=projects%2Fgnome

Bizaare! :-)

Change History (4)

#1 @skippy
18 years ago

This is not a formally supported permalink structure, is it? Last I knew, permalinks needed to have some unique qualifier in them to disambiguate posts with the same name / slug.

#2 @howtoblog
18 years ago

do you have the same problem if you use "/%category%/%postname%-%post_id%" for your permalink structure? (if so, that would give it a unique qualifier, yet still use the same directory structure you're intending, making it a problem with a formally supported permalink structure)

#3 @markjaquith
18 years ago

howtoblog,
Using dashes is not recommended... I've had problems with this in the past.

/%category%/ permalinks are generally a bad idea, because they can be far from permalink if you change the categories that a post is in.

#4 @johnbillion
17 years ago

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

Closing as fixed. /%category%/%postname%/ now works as a permalink structure, although it's not recommended to use it.

Note: See TracTickets for help on using tickets.