Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#2161 closed defect (bug) (fixed)

category_name query fails on category assigned parent category

Reported by: kafkaesqui's profile Kafkaesqui Owned by: ryan's profile ryan
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: General Keywords: category_name query IIS bg|has-patch bg|commit
Focuses: Cc:

Description

A query type of category_name is causing a 404 error for any category assigned to a parent. Setting category to no parent corrects this. This only appears to occur on IIS server. I cannot duplicate the issue elsewhere (i.e. on Apache).

Same problem reported by another user (with query_posts - category parent issue unverified at time of ticket submission):

http://wordpress.org/support/topic/53272

Attachments (1)

2161.diff (1.0 KB) - added by davidhouse 18 years ago.

Download all attachments as: .zip

Change History (9)

#1 @ryan
18 years ago

Try with the full category hierarchy. "parent-cat/sub-cat" We should fallback to matching on just the subcat if the entire hierarchy does not match, but evidently that isn't working.

#2 @Kafkaesqui
18 years ago

Using category_name=parent-cat/sub-cat worked. I agree about the fallback, but at least there's a workaround.

#3 @davidhouse
18 years ago

  • Keywords bg|has-patch added

Here's a patch for the workaround. Don't know how many bugs it'll cause, though.

@davidhouse
18 years ago

#4 @ryan
18 years ago

  • Owner changed from anonymous to ryan

#5 @davidhouse
18 years ago

  • Keywords bg|commit added

Tentatively giving it bg|commit. If this breaks things don't tell anyone I wrote the patch ;)

#6 @ryan
18 years ago

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

(In [3385]) Fallback to matching the leaf category if the full path doesn't match. Props David House. fixes #2161

#7 @ryan
18 years ago

  • Milestone set to 2.0.1

#8 @(none)
17 years ago

  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.