Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbpress posting errors? missing database tables!

  • I am aware this topic has already been discussed in this thread:

    http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/forums-posting-problems-the-definitive-post/?topic_page=1&num=15

    I would like to make it clear that although the OP in that thread found that they were missing ALL of their necessary bbpress tables in their DB – I have found that bbpress is creating the following tables for me:

    wp_bb_forums
    wp_bb_meta
    wp_bb_terms
    wp_bb_term_relationships
    wp_bb_term_taxonomy
    wp_bb_topics

    And that is all. These tables are created only after creation of a group and attempt to post a thread. I am aware however that these are not all of the tables necessary to run bbpress within buddypress! Somewhere, somehow – the installation of bbpress continually fails to prepare the necessary tables for me.

    I resorted to the recommendation in the above linked thread to manually install bbpress and I did that – at the end of the manual installation (which was ‘successful’) i was given a list of errors. This error report seemed to imply that a number of elements weren’t actually installed correctly – or that certain database tables are being left out in my installation.

    I will attempt another manual installation now and paste the error report shortly. I have increased the memory allotment in my php.ini file (as suggested by other members in other threads) to see if that has an impact on my manual install!

    In the meantime, I think it would be a good idea to start this thread just on the premise that people who KNOW they are missing bbpress database tables (either all , or some of them) can collaborate on solutions from that viewpoint, rather than wasting our time attempting solutions such as the deletion of the forum_id value or un-checking and re-checking options!

Viewing 23 replies - 1 through 23 (of 23 total)
  • Avatar of Hugo
    Hugo
    Moderator

    @hnla

    The only table that you appear to be missing is wp_bb_posts.

    When you say manual install what exactly do you mean by that? Have you gone through the motions of using the BP re-install option in dashboard, created new group with forum etc.

    It’s not wasting peoples time to suggest all possible solutions to a problem that is difficult to pin down to an exact cause that can be given a simple step by step fix to.

    *EDIT*

    NOTICE: SOLUTION TO MY PROBLEM HAS BEEN FOUND AND POSTED ON 7TH POST ON THIS PAGE

    *Old Post* :

    So – finished the manual install and still got the errors – can anyone make sense of them? And are they related to or do they explain the missing database tables?

    `SQL ERROR!
    >>> Database: wordpress (localhost)
    >>>>>> CREATE TABLE IF NOT EXISTS `bb_posts` (
    `post_id` bigint(20) NOT NULL auto_increment,
    `forum_id` int(10) NOT NULL default 1,
    `topic_id` bigint(20) NOT NULL default 1,
    `poster_id` int(10) NOT NULL default 0,
    `post_text` text NOT NULL,
    `post_time` datetime NOT NULL default ’0000-00-00 00:00:00′,
    `poster_ip` varchar(15) NOT NULL default ”,
    `post_status` tinyint(1) NOT NULL default 0,
    `post_position` bigint(20) NOT NULL default 0,
    PRIMARY KEY (`post_id`),
    KEY `topic_time` (`topic_id`, `post_time`),
    KEY `poster_time` (`poster_id`, `post_time`),
    KEY `post_time` (`post_time`),
    FULLTEXT KEY `post_text` (`post_text`)
    ) TYPE = MYISAM DEFAULT CHARACTER SET ‘utf8′;
    >>>>>> 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 ‘TYPE = MYISAM DEFAULT CHARACTER SET ‘utf8” at line 16`

    @hnla -

    Thanks! I was sure I was missing at least one or many database tables, and I suppose my error report from the manual install is making it clear that I’m missing bb_posts.

    Manual installation of bbpress consists of downloading it in a zip (available on the bbpress site) installing it on the server much like wordpress was installed – and then integrating it with wordpress (which allows it later to be used with buddypress):

    The guide I use for manual installation and wordpress integration:

    http://www.wpmods.com/integrate-wordpress-bbpress

    I always successfully install bbpress but not without the above posted errors. Although manual installation was suggested as a fix to the common posting errors problem it makes no difference for me as the database table “bb_posts” fails to be created whether I do a single-click install or manual.

    As for your statement
    `It’s not wasting peoples time to suggest all possible solutions to a problem that is difficult to pin down to an exact cause`

    - I created this thread specifically for people who have pinned down part of the problem – namely that we are missing database table(s) after installation. So maybe we can tackle whatever is causing that issue in particular.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    This will not be helpful and to be honest I am not sure why that one table is repeatedly not installed correctly, but I would suggest it’s perhaps better not to go the separate BB install – unless of course you specifically wanted the standalone forum – and stick to the BP bundle as that does work, and normally without any hitch also very? shortly BBPress will be released as a plugin and that will integrate with BP and replace the present implementation of BBPress in BP

    Just so the thread is armed with as much detail as possible can you state the versions of everything you are running plus whether child themes in use etc.

    Interestingly on one of my many test installs on which I hadn’t set up forums, It’s failing to create any tables but not sure why that is at this minute and haven’t time right now to look in detail at what’s occurring but will come back to it later.

    Well – I’ve made progress already : I did a clean re-install of WordPress, then bbPress -

    Doing a manual install of bbPress is helpful (for those having issues) because if there are any issues with installation (which may be occuring during a single click install as well) it will be laid out in the post-installation error report. I’m sure there is an error report log somewhere after a single-click installation I just haven’t bothered to look for one -

    In any case I googled the error coming up on my report :

    `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 ‘TYPE = MYISAM DEFAULT CHARACTER SET ‘utf8” at line 16`

    and found mention of errors with SQL syntax involving utf8 on many other sites (not just for bbpress) – the general consensus is that the newer version(s) of MYsQL sometimes have hiccups with utf8 during table creation (I have no idea why). In particular I am running a WAMP server with MySQL version 5.5.8

    Seeing as BuddyPress has a min. requirement of MySQL version 4.x (something, hehe) – I figured I would try to run a manual install with a lower version of MySQL, so I installed 5.1.40 (arbitrary, could have used any version I’m sure) : WAMP Server 2 makes this very easy by the way, simply mouse over your MySQL -> Version -> and click ‘More’. You can then toggle between versions.

    In any case, with MySQL 5.1.40 installed I was able to do the manual install and there were no errors reported! And checking my database I now see that bb_posts was successfully installed!

    Testing now to see if this made any changes in the forum errors I’ve been having with bbPress + BuddyPress.

    SUCCESS!

    I just made my first successful Group/Forum post in the past 2 days of troubleshooting!

    The solution : Downgraded my version of MySQL – as the newer(or newest) version has known hiccups with some people in creating database tables (in this case, my installation was failing to create bb_posts) :

    By downgrading my version of MySQL I was able to successfully install bbPress with a fresh copy (I did this manually but am positive it would work with single-click installation as well) – and the missing table (bb_posts) was created during my fresh installation.

    I sincerely hope this helps someone else out there as I know the ‘error creating topic’ dilemma has affected many people and there are lots of different solutions. Some of us simply need to try the methods mentioned in other threads (deleting forum_id value, or re-enabling forum option in group admin) -

    Others are actually dealing with database issues, including missing table(s). This was my case, and I was missing that table because of a MySQL syntax error during installation of bbPress – fixed by downgrading my MySQL version on my WAMP server. (Hate to repeat myself but I know it’s important to be clear).

    I have to thank the posters in the thread I linked in the OP for suggesting a manual installation (and hnla for linking to that thread in another topic) – it was by doing a manual installation that I was able to see the error report and pinpoint which database table in particular was failing to install properly, and why (MySQL syntax error).

    As for your question on the versions I am using, hnla:

    I am running WordPress 3.1 with BuddyPress 1.2.7 and bbPress 1.0.3.
    My server is WAMP Server 2.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Really glad it’s sorted, the solution was an odd one though if anything the newer MySQL versions should be better but nasty conflicts do arise between various versions of all these essential core apps on a server – I’m having to deal with a few issues with MySQL on production servers that are turning my hair white at present. I suspect the root cause of your issue is still to be understood exactly and fully.

    This thread is a helpful one for others though and we should ensure it’s linked to from the others which I’ll do if you haven’t already.
    Edit// great, see you’ve done that.

    Of course in all this we should stop to consider that down grading ones MySQL version on a dev server is one thing but many will be unable to do that on a production or hosted server easily and even if they can they should proceed with absolute caution in doing this on a *nix server as it needs to be done rather carefully.

    Can you share the SQL statement you found wasn’t compatible with the newer MySQL, or link to a resource? We ought to send a patch to bbPress for this. Let me know, thanks.

    @Paul_Gibbs -

    I’m not sure if it’s any help but the only clue I have is the error report pasted in the 3rd post. Whatever line of code was attempting to create the bb_posts table was conflicting or producing an error with my version of MySQL.

    Thanks

    Avatar of lumenbeing
    lumenbeing
    Member

    @lumenbeing

    I’m one of the ones who installed WordPress with one click on Dreamhost. I can’t downgrade my MySQL and even if I could, we have a production server running membership site now (just without forums) so manual wordress install from scratch is not an option. Can I just manually create missing tables using phpmyadmin or something?

    Lumenbeing, the answer is yes, in my experience. I am testing WordPress MultiSite with BuddyPress on a Dreamhost setup. I did install by uploading via FTP, not via the one click, but for whatever reason, none of the BB Press tables were created in my database. I tried applying the patch in Paul’s post above, but that wasn’t enough and uninstalling and re-installing the forums via the Web still didn’t help.

    I went through the MySQL statements in wp-content/plugins/buddypress/bp-forums/bbpress/bb-admin/includes/defaults.bb-schema.php and was able to create the tables manually in the SQL dialog box in phpMyAdmin. You do need to make sure you fill in the database names for the variable $bbdb in each statement
    ie: CREATE TABLE IF NOT EXISTS `$bbdb->forums
    needed to become
    CREATE TABLE IF NOT EXISTS `tablename_bb_forums`
    But I am now able to use the forums for public/private/hidden groups as I expected they would work.
    I do suspect this is a server issue and perhaps a MySQL version issue as well. I can’t imagine why none of the tables would be created, otherwise.
    Hope this helps further the conversation.

    Avatar of lumenbeing
    lumenbeing
    Member

    @lumenbeing

    @pjries Thanks for this. I hope I understand what you said correctly. I’m going to give it a try today and I’ll post the results here.

    Hi I have this problem
    When a user tries to register on my site the normal process takes up when he says we will send an email to confirm that such mail will never go anywhere

    Avatar of lumenbeing
    lumenbeing
    Member

    @lumenbeing

    @pjries Okay actually I’m confused by the bit you said was important. When you wrote
    `CREATE TABLE IF NOT EXISTS tablename_bb_forums`

    did you mean I should insert the wp_???_ bit ? Or whatever the prefix used in other tables?
    I think that’s what you meant, so would the command look like this?
    `CREATE TABLE IF NOT EXISTS `wp_i28ycb_bb_forums` (
    `forum_id` int(10) NOT NULL auto_increment,
    `forum_name` varchar(150) NOT NULL default ”,
    `forum_slug` varchar(255) NOT NULL default ”,
    `forum_desc` text NOT NULL,
    `forum_parent` int(10) NOT NULL default 0,
    `forum_order` int(10) NOT NULL default 0,
    `topics` bigint(20) NOT NULL default 0,
    `posts` bigint(20) NOT NULL default 0,
    PRIMARY KEY (`forum_id`),
    KEY `forum_slug` (`forum_slug`)
    );
    `

    Avatar of lumenbeing
    lumenbeing
    Member

    @lumenbeing

    or something to that effect? backticks got removed from the post

    Hello, not sure if this is your exact problem, but I was not able to post anything in my forum. I looked and had no tables. the fix I used after trying everything I could find:
    1. First delete the bb-config.php from you server.
    2. download the zip of bbpress from their site. -> extract all -> and ftp to a new directory (foooorum was mine)
    3. go to http://yourawsomedomain.com/fooooorum it should open their installer.
    4. ftp your wp-config.php from your server to computer and open it.
    5. follow instructions on the installer first is db info: dbhost db user, user password. all this is in the wp-config.php file you just opened. Use this same info -> click advanced settings, and make sure the host is right mine needed to be changed from localhost to mysql.mydomain.com
    6. click to step two, click wordpress integration. Now you need to log onto you phpmyadmin. you can often do this by mysql.yourdomain.com then use the login details for the db that you used again, the dbuser and user password. Once in there click the database, you will see a lot of files that look like wp_daks_bpetc This is important. you need the wp_daks (the daks signify random letters from your actual one). So just where it asks for the tables of wp files give it to them in “wp_daks_” format. click next, and install i think. ALMOST THERE!
    7. go to your wp dashboard click on the buddypress area, click on forums setup. it will say you already did it, but click reinstall.
    8. Select use an outside install.
    9. Enter the path of the other install for me it already said /user/domain/ so i just changed it to /user/domain/foooorum. Click complete and you are good to go. no it should all work. Please let me know if it doesn’t, cause it worked for me easily when nothing else would.

    For mysql 5.5.x, error occurred when creating ‘wp_bb_posts’ table.
    ‘TYPE = MYISAM’ should change to ‘ENGINE = MYISAM’

    CREATE TABLE IF NOT EXISTS `wp_bb_posts` (
    `post_id` bigint(20) NOT NULL auto_increment,
    `forum_id` int(10) NOT NULL default 1,
    `topic_id` bigint(20) NOT NULL default 1,
    `poster_id` int(10) NOT NULL default 0,
    `post_text` text NOT NULL,
    `post_time` datetime NOT NULL default ’0000-00-00 00:00:00′,
    `poster_ip` varchar(15) NOT NULL default ”,
    `post_status` tinyint(1) NOT NULL default 0,
    `post_position` bigint(20) NOT NULL default 0,
    PRIMARY KEY (`post_id`),
    KEY `topic_time` (`topic_id`, `post_time`),
    KEY `poster_time` (`poster_id`, `post_time`),
    KEY `post_time` (`post_time`),
    FULLTEXT KEY `post_text` (`post_text`)
    ) ENGINE = MYISAM DEFAULT CHARACTER SET ‘utf8′;

    Hello,

    If mysql 5.5.x was used and the problem occurred in bbpress forum installed within buddypress,
    1) delete buddypress.
    2) It might be useful to check if the tables for bbpress were deleted. Check also there is no bb-config.php in the web root folder.
    3) reinstall buddypress
    4) change ‘TYPE = MYISAM’ to ‘ENGINE = MYISAM’ in /wp-content/plugins/buddypress/bp-forums/bbpress/bb-admin/includes/defaults.bb-schema.php before creating groups and using forums.
    5) create groups and test forums.

    As I said a month ago, this is a bug in bbPress. I made a bug report and provided a patch for it, which you can find at http://trac.bbpress.org/ticket/1486

    To get this fixed I would recommend you post on the bbPress forums at http://bbpress.org/forums/

    Avatar of sidjags
    sidjags
    Member

    @sidjags

    in addition to what @paul gibbs has to say…

    this is the answer you need guys: it helped me out too…

    Here is solution:
    1) delete buddypress.
    2) It might be useful to check if the tables for bbpress were deleted. Check also there is no bb-config.php in the web root folder.
    3) reinstall buddypress
    4) change ‘TYPE = MYISAM’ to ‘ENGINE = MYISAM’ in /wp-content/plugins/buddypress/bp-forums/bbpress/bb-admin/includes/defaults.bb-schema.php before creating groups and using forums.
    5) create groups and test forums.

    And I find it here: http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/bbpress-posting-errors-missing-database-tables/?topic_page=2&num=15

    a member @fladnag pointed this out in a different thread…

    I just spent a few hours on this and finally got it to work by manually creating the [prefix]_bb_posts table with the SQL from jdpark7. But, the single-quotes in the statement had to be re-typed to get it to work. Note, my db prefix is wp1_:

    CREATE TABLE IF NOT EXISTS wp1_bb_posts (
    post_id bigint(20) NOT NULL auto_increment,
    forum_id int(10) NOT NULL default 1,
    topic_id bigint(20) NOT NULL default 1,
    poster_id int(10) NOT NULL default 0,
    post_text text NOT NULL,
    post_time datetime NOT NULL default ’0000-00-00 00:00:00′,
    poster_ip varchar(15) NOT NULL default ”,
    post_status tinyint(1) NOT NULL default 0,
    post_position bigint(20) NOT NULL default 0,
    PRIMARY KEY (post_id),
    KEY topic_time (topic_id, post_time),
    KEY poster_time (poster_id, post_time),
    KEY post_time (post_time),
    FULLTEXT KEY post_text (post_text)
    ) ENGINE = MYISAM DEFAULT CHARACTER SET ‘utf8′;

    Whew!

Viewing 23 replies - 1 through 23 (of 23 total)

You must be logged in to reply to this topic.