WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 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:

Description

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)

comment:1 @thee174 years ago

  • Component changed from General to Template

comment:2 @scribu4 years ago

  • Keywords reporter-feedback added

Could you post more detailed steps to reproduce?

comment:3 @thee174 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.

comment:4 @Utkarsh4 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.

comment:5 @scribu4 years ago

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

comment:6 @scribu4 years ago

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

comment:7 @scribu4 years ago

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

comment:8 @scribu4 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

comment:9 @scribu4 years ago

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