[wp-trac] [WordPress Trac] #14679: in_category returns true for parent cat if last item on page is from tested subcat

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 24 04:21:05 UTC 2010


#14679: in_category returns true for parent cat if last item on page is from tested
subcat
--------------------------+-------------------------------------------------
 Reporter:  Usurper       |       Owner:                         
     Type:  defect (bug)  |      Status:  new                    
 Priority:  normal        |   Milestone:  Awaiting Review        
Component:  Template      |     Version:  3.0                    
 Severity:  normal        |    Keywords:  in_category, categories
--------------------------+-------------------------------------------------
 Assume the following category structure

 site.com
 site.com/category/parent
 site.com/category/parent/subcat

 If in_category is used to test for subcat, it will return true if the user
 is viewing site.com/category/parent and its loop is displaying posts from
 parent and its subcategory, and the last post on the page is from the
 subcategory.

 Viewing pages 2, 3, 4, and 5 of posts led to the diagnosis, and inserting
 test posts at the end of pages that were showing the problem confirmed the
 bug.

 Upgraded to 3.0.1 to see if the problem was resolved. It persists.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14679>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list