To create this problem I was doing the following:
1. I created a plugin
2. This plugin has an action call to 'init'
3. The init function runs and then based upon a POST variable runs the following code:
query_posts(array('categoryin' => array($sql)));
4. I've checked and tested $sql variable to ensure that it's passing the correct values.
5. 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.
e.g.
parent 1
sub 1
sub 2
parent 2
sub2 1
sub2 2
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...