Fatal error: Call to undefined method stdClass::have_posts() in /home/…/…/wp-content/plugins/bbpress/bbp-includes/bbp-reply-template.php on line 168

Notice also, that the page title being displayed is from one of the WordPress posts that came with auto-importing dummy data for the theme.

I know a link to the site would help, but I am working with a client who’s not comfortable getting the link out before site-live time. So, sorry about that.

I asked for help from WordPress Forum support, and was told that this was most probably a theme compatibility issue. So I went to the theme’s support forum.

Last night, the theme’s author/s were helpful enough to guide me through what I assume are the usual stuff in troubleshooting this kind of stuff.

Here are the things I’ve done so far:
1. Disabled all plugins apart from bbPress – this resulted to the forum giving me a 404
2. Enabled BuddyPress – this brought back the forums, but with the same issue
3. Emptied all sidebar widgets that have to do with the theme.
4. Used the other theme package (bbPress Twenty Ten).
5. Deleted the function referenced in the error. Led to some new error. This was a desperate, illogical attempt on my part so i undid that.
6. Deleted the wordpress post being shown in the page title. It just displayed the title of the next wordpress post in line.
Note: every time i check to see if that fixed it, i do a clear-cache-reload, just so i’m sure nothing in cache was giving me this headache.

I really hope someone could help out.. Has anyone seen this kind of error ever been documented elsewhere?

These errors have come up a few times here recently. It’s a regression in a way, but it’s also the themes doing-it-wrong, and using bbPress loops outside of their intended purposes. My fault for not documenting them more in-depth, or protecting the data from being used incorrectly.

It’s most likely because of the themes using bbp_has_replies() outside of the main query loop. More helpful than the error itself would be the backtrace of what actually caused the error to occur.