Duplicate posts returned if multiple meta_values match and no meta_key is set
|Reported by:||trepmal||Owned by:||dd32|
I'm currently experiencing issues that appear to be related to the second point of 12660, "Using just meta_value returns duplicate posts based on the meta_value"
I have a post with multiple custom fields, for example
"address" with value "123 Lorem St"
"city" with value "Lorem"
When I perform a search to return posts with any meta_value LIKE 'sequim' ...
$args = array( 'meta_query' => array( array( 'value' => 'lorem', 'compare' => 'LIKE' ) ) ); query_posts($args);
... the post I described above is returned twice, once for each meta_value that matches.
I'd expect WP to handle the result in a way that duplicate posts would not be returned.
My current workaround is to require the user to choose a key to search in, but I'd like to be able to do more of an all-in-one search.
Change History (25)
- Keywords reporter-feedback added
- Keywords fixed-major added
- Milestone changed from 3.2 to 3.1.3