Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#12857 closed defect (bug) (fixed)

Bug with WP class and custom taxonomy/post type

Reported by: momo360modena's profile momo360modena Owned by: ryan's profile ryan
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Query Keywords: has-patch needs-testing
Focuses: Cc:


During the parse_request function, WordPress check the query if post_type and taxonomy are loaded.

But currently, WordPress verify with the taxonomy->name and the post_type->name instead the query_var.

And as the query_var and the name can be different...

Attachments (1)

classes.php.patch (1.6 KB) - added by momo360modena 14 years ago.

Download all attachments as: .zip

Change History (6)

#1 @dd32
14 years ago

That code block doesnt seem like it'd be required to me. WP_Query should be handling it all (And i believe it is).

#2 @scribu
14 years ago

marked #13076 as dup.

#3 @dd32
14 years ago

Theres another bug related to this, If you have a post_type and a taxonomy of the same name, they'll receive the same rewrite token, resulting in broken rewrite rules for one or the other.

#4 @chrisscott
14 years ago

The patch in #13076 from prettyboymp works for the original bug. I tried removing the code block as dd32 suggested and that didn't fix it--both the entire block at line 276 and the block at line 278 (as of r14241).

Can that patch be committed since this is a regression from 2.9?

#5 @ryan
14 years ago

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

(In [14246]) Fix custom tax and post type query var checks. Props prettyboymp. fixes #12857 #13076

Note: See TracTickets for help on using tickets.