[wp-trac] Re: [WordPress Trac] #6551: get_adjacent_post doesn't exclude categories

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 30 09:52:57 GMT 2008


#6551: get_adjacent_post doesn't exclude categories
----------------------------------------------------------------------------+
 Reporter:  filosofo                                                        |        Owner:  anonymous
     Type:  defect                                                          |       Status:  reopened 
 Priority:  normal                                                          |    Milestone:  2.6.1    
Component:  General                                                         |      Version:  2.6      
 Severity:  normal                                                          |   Resolution:           
 Keywords:  has-patch, get_adjacent_post, get_previous_post, get_next_post  |  
----------------------------------------------------------------------------+
Changes (by scribu):

  * milestone:  2.9 => 2.6.1

Comment:

 I think this error might be related:

 {{{
 [30-Jul-2008 01:18:56] WordPress database error You have an error in your
 SQL syntax; check the manual that corresponds to your MySQL server version
 for the right syntax to use near ') WHERE p.post_date > '2007-05-24
 17:38:40' AND p.post_type = 'post' AND p.post_' at line 1 for query SELECT
 p.* FROM blog_posts AS p  INNER JOIN blog_term_relationships AS tr ON p.ID
 = tr.object_id INNER JOIN blog_term_taxonomy tt ON tr.term_taxonomy_id =
 tt.term_taxonomy_id AND tt.taxonomy = 'category' AND tt.term_id IN ()
 WHERE p.post_date > '2007-05-24 17:38:40' AND p.post_type = 'post' AND
 p.post_status = 'publish' AND tt.taxonomy = 'category' ORDER BY
 p.post_date ASC LIMIT 1 made by get_adjacent_post
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6551#comment:7>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list