Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#15263 closed defect (bug) (fixed)

Several Template Hierarchy areas a broken

Reported by: thee17 Owned by: scribu
Milestone: 3.1 Priority: normal
Severity: critical Version: 3.1
Component: Template Keywords: needs-patch
Focuses: Cc:


I think I found a problem in trunk. If you category-term.php in a there does not work, category.php does, I have tested author, taxonomy, and tag with similar results. I was able to duplicate on 2 sites running the most recent trunk. I think the problem is in [15611]. When I revert the wp-includes/theme.php back to revision 15610 it works as expected.

Change History (9)

#1 @thee17
9 years ago

  • Component changed from General to Template

#2 @scribu
9 years ago

  • Keywords reporter-feedback added

Could you post more detailed steps to reproduce?

#3 @thee17
9 years ago

Take a category, tax, or tag:
(using categories because it is more likely you have one to test. For this example the catagory ID is 5 and slug is test)
Create a category.php to your theme visit your category test and the template is your category template.
Rename it to category-5.php or category-test.php and the visit your category and you will see it use your archive.php or index.php rather than your template.

mrmist was also able to reproduce in #wordpress IRC today.

#4 @Utkarsh
9 years ago

  • Cc admin@… added
  • Keywords needs-patch added; reporter-feedback removed

get_query_var( 'cat' ) returns a blank string on the category archives page.

#5 @scribu
9 years ago

Utkarsh, that's a different issue. Please report it on #12891

#6 @scribu
9 years ago

  • Owner set to scribu
  • Status changed from new to accepted

#7 @scribu
9 years ago

Ah, I see what you mean. Related, anyway.

#8 @scribu
9 years ago

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

(In [16115]) Use get_queried_object() in more get_*_template() functions. Fixes #15263

#9 @scribu
9 years ago

  • Milestone changed from Awaiting Review to 3.1
Note: See TracTickets for help on using tickets.