Subquery bug #1112854: Subqueries use wrong arguments
Use the instructions at the top of that post to reproduce the same problem.
It is marked as an issue in core but the problem still exists when using a taxonomy filter (with depth), a join and another filter (I think... haven't tested all combinations). As far as I know, only taxonomy with depth uses a subquery so is the only filter affected.
If you turn on devel query logging you can see the query placeholders are incorrect.
A workaround is to reorder the filters, moving the taxonomy filter to the top. Adding the taxonomy subquery to the main query before other filters seems to prevent the issue.
I wanted to order my filters differently because they are exposed and other users shouldn't have to do this workaround manually if at all possible.
Attached is dereine's patch (from the same issue) to clone subquery conditions before adding to the main query. It fixes the issue for me. If the subquery bug isn't going to be fixed until D8 can we test an use this workaround in the meantime?
Comment | File | Size | Author |
---|---|---|---|
views-subquery-bug.patch | 1010 bytes | Liam Mitchell | |
Comments
Comment #1
Adam S CreditAttribution: Adam S commentedThis problem must be more systemic than just effecting taxonomy with depth. The Content: User posted or commented argument handler also has this problem see Subqueries uses wrong arguments.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedSubscribe
Comment #3
dawehnerInteresting i wrote a patch for this already, didn't know it :)
Thanks for digging it out :)
Commited to 7.x
Comment #4
BenK CreditAttribution: BenK commentedKeeping track of this thread
Comment #5
good_man CreditAttribution: good_man commentedsubscribe.