Multiple Category Handling Wrong
|Reported by:||zackdesign||Owned by:||anonymous|
|Severity:||trivial||Keywords:||category, query_posts, categories, multiple, select|
To create this problem I was doing the following:
- I created a plugin
- This plugin has an action call to 'init'
- The init function runs and then based upon a POST variable runs the following code:
query_posts(array('categoryin' => array($sql)));
- I've checked and tested $sql variable to ensure that it's passing the correct values.
- Testing further, it would appear that the implementation of categoryin is extremely haphazard. Sometimes it works, sometimes it doesn't. I'd like to request that this get fixed soon so that I don't have to resort to doing a custom query...!
What I want is for the user to select a set of categories and only show posts that span every single one of those categories. At the moment it shows the correct output sometimes and then other times shows the post even if there is one category it hasn't been added to. I have a setup of parent and child categories, with child categories used for the testing across parents.
I test across more than two parents and using categories like so: sub 1, sub2 2. I never choose multiple child categories under the one parent.
Hopefully this describes my problem in enough detail! You can see it an action currently at http://skopelostopos.net/ (see the drop-downs under Properties).
By the time you see it I may or may not have 1) fixed it using custom queries or 2) upgraded wordpress to the fix that I hope this ticket will engender...