Ticket #6459 (closed defect (bug): invalid)

Opened 4 years ago

Last modified 2 years ago

Pages get the ID of the Default Post Category, conflict with in_category template tag

Reported by: PozHonks Owned by: ryan
Priority: normal Milestone:
Component: Taxonomy Version: 2.5
Severity: normal Keywords: pages category term_taxonomy_id
Cc:

Description

Pages are marked with the term_taxonomy_id of the Default Post Category ID. If the Default Post Category ID is 8, in a template, when I use the in_category(8) template tag in the Loop and displaying a Page, the in_category(8) template tag is activated, thus showing what is reserved to posts belonging to category ID 8. Pages should get a term_taxonomy_id = 0 or nothing.

Change History

comment:1   ryan4 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

  • Owner changed from anonymous to ryan
  • Component changed from General to Taxonomy

this isn't valid any longer, is it?

I have had this happen in 2.8.4. The default post category id was added to a new page created. So it double highlighted a menu item because it thought it was current_cat. Fixed it by removing default category and recreated the page for my situation.

comment:4   ryan2 years ago

  • Status changed from new to closed
  • Resolution set to invalid
  • Milestone 2.9 deleted

Running in_category() on a page is meaningless.

Note: See TracTickets for help on using tickets.