Forums

Join
bbPress Support ForumsTroubleshootingError when deleting a topic

Info

Error when deleting a topic

  1. So I've successfully integrated WordPress and bbPress, and have been messing around with it! It's great, but I've been receiving this error every time I delete a topic. (The topic still gets deleted, it's just. . . I have to hit "back" in my browser, but having an error at all still bugs me.)

    bbPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE status=0 AND user_id>0 AND size>0 AND post_id IN (SELECT post_id FROM bb_p' at line 1]
    SELECT count(*) as count FROM WHERE status=0 AND user_id>0 AND size>0 AND post_id IN (SELECT post_id FROM bb_posts WHERE post_status=0 AND topic_id=25)

    Warning: Cannot modify header information - headers already sent by (output started at /my/absolute/path/forum/bb-includes/db-mysql.php:130) in /my/absolute/path/forum/bb-includes/pluggable.php on line 232

    Any insight on this would be greatly appreciated, thank you!

  2. What versions did you integrate? Are you using any plugins?

  3. What's your MySQL version?

  4. I have the same problem. version 0.9.0.4 using mysql 5.0 with lots of plugins. no integration.

  5. Ok, I did some tests, it seems to happen when I enable this plugin:

    bbPress Attachments

    --- big bummer.

  6. Okay, I've found the problem.

    Go to line 634 (it should say function bb_attachments_recount($post_id=0) { // update topic icon flag and sync attachment count for topic given a post_id)

    Right under that, add global $bb_attachments; on a new line.

  7. Thanks Nightgunner5 that worked!

  8. You must log in to post.