Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress breaks WP_Query in certain cases


  • krazen
    Participant

    @krazen

    Hello!

    I’ve stumbled across that problem today. Let’s say I make a forum of ID 65 private in bbPress’ settings.

    Then, somewhere in my template I’m using get_posts to pull some custom post type content which has nothing to do with the forums. When there is no user with sufficient privileges logged in, bbPress adds following SQL to my query:
    ... INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) ...
    and

    ... AND ( 
      ( wp_postmeta.meta_key = '_bbp_forum_id' AND CAST(wp_postmeta.meta_value AS SIGNED) != '65' )
    ) ... 

    which always ends up breaking my query, since the posts I’m querying for do not have meta_key entries of ‘_bbp_forum_id’.

    I’ve switched the plugin off temporarily, but that doesn’t solve the problem for good.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar