[wp-trac] [WordPress Trac] #9962: wp_get_object_terms fails on some queries

WordPress Trac wp-trac at lists.automattic.com
Thu May 28 18:55:36 GMT 2009


#9962: wp_get_object_terms fails on some queries
--------------------------+-------------------------------------------------
 Reporter:  wnorris       |       Owner:  filosofo 
     Type:  defect (bug)  |      Status:  new      
 Priority:  high          |   Milestone:  2.8      
Component:  Taxonomy      |     Version:  2.8      
 Severity:  critical      |    Keywords:  has-patch
--------------------------+-------------------------------------------------
 When deleting multiples posts (and perhaps in other cases), wpdb throws
 the following error:  `WordPress database error: [Unknown column 't.name'
 in 'order clause']`

 This is because one of the sql queries in taxonomy.php fails to include
 the terms table in the query, which is sometimes referenced in the sql
 order clause.  Patch attached.  Patch seems to work, but should definitely
 be reviewed, as my SQL-fu isn't what it used to be.

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


More information about the wp-trac mailing list