[wp-trac] [WordPress Trac] #3681: Lack of forced GROUP BY or
DISTINCT in
query.php causes duplicate posts when plugins JOIN on wp_posts.ID
= wp_post2cat.post_id
WordPress Trac
wp-trac at lists.automattic.com
Fri Jan 26 04:16:33 GMT 2007
#3681: Lack of forced GROUP BY or DISTINCT in query.php causes duplicate posts
when plugins JOIN on wp_posts.ID = wp_post2cat.post_id
---------------------+------------------------------------------------------
Reporter: ajd777 | Owner: anonymous
Type: defect | Status: new
Priority: high | Milestone:
Component: General | Version: 2.1
Severity: major | Keywords:
---------------------+------------------------------------------------------
In version 2.0.x DISTINCT was automatically added to all queries that
weren't in the admin panel (line 593 of classes.php). However, 2.1 took
out this section and doesn't automatically us it or GROUP BY except when
viewing single categories (lines 811 (808) and 845 (841) of query.php).
This is an easy fix just add a default filter or force it inside the
function to either use GROUP BY `ID` or DISTINCT by default.
--
Ticket URL: <http://trac.wordpress.org/ticket/3681>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list