Problem with tax_query

  • I am running a simple tax query with multiple arrays (taxonomies). I am noticing that the code is adding to the where clause with a table alias ‘tt1’ but not adding the table in the inner join. I have come to the following lines:

    if ($clauses['join'] && $taxonomies[ 'join' ] && strpos( $clauses[ 'join' ], $taxonomies[ 'join' ] ) === false )
        $clauses[ 'join' ] .= $taxonomies[ 'join' ];

    and changed it to:

    if ($taxonomies[ 'join' ] && strpos( $clauses[ 'join' ], $taxonomies[ 'join' ] ) === false )
        $clauses[ 'join' ] .= $taxonomies[ 'join' ];

    I do not believe this will work for everything, but it has worked for me now. I wanted to alert you of the problem and maybe push out a proper fix. When I have time to actually look into what can possibly be making it wrong and then make it right I will (if not previously fixed)


Viewing 1 replies (of 1 total)
  • Plugin Author Rachel Carden


    Thanks for letting me know. It looks like there are some issues going on with my post_clauses filter. I’m looking into it right now.

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with tax_query’ is closed to new replies.
Skip to toolbar