Home > Uncategorized > First taste of bbpress – was sweet but getting sour

First taste of bbpress – was sweet but getting sour

Hey hey.. when we had to implement a bulletin board for an institution, the first thought was for phpbb, but the time limitation as well as lack of resources to hack through a completely new code took the turn and prompted us to take a new course. The bb press way. Atleast it was the same language written and used in the same way we were handling for more than a year. Well _ck_ should be thanked for all the goodies. And when we find bugs or errors, we all should help each other to make the system more better.

When I was using the bbPress Attachments, trying to delete a post, even by admin or moderator, would confront with an SQL error. The same error was reported by Joseph, for which _ck_ responded with downloading a new version from the trunk. For me even after the new version came in, I was getting the error.

Reproducing, the error

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=13)

Careful analysis of the error showed me the possible error, see my main job at Saturn SPL, is code review (mostly debugging). The query was not having the table name, funny!. A scrutiny of the source file identified the error as a typo, on line no 638, inside ‘function bb_attachments_recount’, the global statement parameter, was having a typo. In the downloaded source it was ‘bb_attchments’, whereas it should have been ‘bb_attachments’. I never needed to do the scrutiny or use a lens to find the mistake, since my environment is ‘PHP Easy Eclipse’ on Ubuntu. I started using Eclipse, and did the configuration and setup after much trouble and web searches, but for any body IBM has a good documentation on WordPress plug-in with Eclipse.

Categories: Uncategorized Tags:
  1. No comments yet.
  1. No trackbacks yet.

seventy nine + = eighty three