BuddyPress forum posting problem possibly linked to Multi-DB

Overview
==========
I am seeing a problem posting to a forum in BuddyPress which I believe
I have linked to Multi-DB through some experiments.

The problem that I am able to reproduce (over successive fresh installs)
is the error message "There was an error when creating the topic" when
attempting to start a new topic.

Background
============
Please refer to the thread:
http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/group-creation-error-are-you-sure-you-want-to-do-this/

The initial 2 messages by the other author exactly describes the problems I was also first having after having customized my install with BuddyPress, Multi-DB and several plugins.

I decided to perform some experiments with fresh installs with only BuddyPres, Multi-DB and no other plugins.

Setup
=========
The following is some information on my setup:
Ubuntu 8.04.4 LTS
PHP 5.2.6
MySQL 5.0.51a
WordPress 3.0.4
BuddyPress 1.2.7
Multi-DB 3.0.4

Note: The installs are only on my local machine and not available currently on a web server.

Installs
=========

First install without Multi-DB
---------------------------------
I start out by installing Wordpress 3.0.4 in network mode with subdomains.

I next install BuddyPress 1.2.7 automatically from the Plugin menu.
I enable Forum support with the 1 click install within the BuddyPress menu.

I enable and use the default BuddyPress theme.

Group creation and posting to forums works without any problems.

Second install with Multi-DB
-----------------------------
I start from scratch again and follow the steps from the previous section,
additionally adding in the install of Multi-DB 3.0.4.

I set this up for 4096 databases. Everything seems to install correctly
(new databases created and in use, basic operation working). I delete
the original single database to ensure that I am only working off the new
set of 4097 databases (including global db).

Group creation seems to work fine and I am able to create several of them.
I am not seeing the group problems that I initially saw in a fully loaded
(with plugins) configuration referenced in the Background section above.

Posting to forums however does not work at all, consistently producing the
message "There was an error when creating the topic".

Summary
========
I tried to simplify the configuration as much as possible as described above.
I ran through the installs above (with and without Multi-DB) a couple times
with the same results.

Could one of the developer try to reproduce my results?

If need be, I could prepare a tarball of an example WordPress install with accompanying MySQL database dumps showing the problem.

Thanks,

Scott

  • Barry
    • DEV MAN’s Mascot

    Hi @blueskies - can you confirm that I've read this correctly:

    Attempt 1 without multi-db works ok.
    Attempt 2 with multi-db works ok but forums not working?

    I'm not 100% sure, but I think the forums for buddypress are still based on the bbpress database class and so doesn't use the standard WP one or the multi-db replacement? If someone more familiar than me with buddypress can confirm or not, then it may be a case of setting the forums to be in a specific db.

  • BlueSkies
    • Site Builder, Child of Zeus

    David suggested that I post again to this topic for an update.

    What can I try to possibly fix this problem?

    Would it make sense for WPMU Dev to work directly with the BuddyPress/BB Press team on this (after reproducing the bug) to ensure that Multi-DB is 100% compatible? I would guess that many of your customers are also running with BuddyPress/BB Press.

    Thanks,

    Scott

  • BlueSkies
    • Site Builder, Child of Zeus

    Hi Barry,

    Thanks for your suggestion. I worked on this tonight.

    I created a brand new install with WP 3.1 and BuddyPress 1.2.8 and confirmed that I could create groups and forum topics within the groups without any issues.

    Next I installed the latest Multi-DB 3.0.5. I noticed the addition of several more add_global calls in db-config.php since the last version I used. I followed the pattern and your suggestion and added all the bbpress tables I could find:

    add_global_table('bb_forums');
    add_global_table('bb_meta');
    add_global_table('bb_posts');
    add_global_table('bb_term_relationships');
    add_global_table('bb_term_taxonomy');
    add_global_table('bb_terms');
    add_global_table('bb_topics');

    I executed the move-blogs.php script and noted that the bbpress tables got moved into bud_global (my global db). I confirmed this by displaying the tables in this db.

    I was able to create a new group without issue. When I tried to post a new topic to that group, I still see the same error: "There was an error when creating the topic".

    Would it be possible for you to try to reproduce my results?
    (I'd also be happy to email you a tarball of my installation including SQL if it would help).

    Thanks,

    Scott

  • BlueSkies
    • Site Builder, Child of Zeus

    Many print statements later I found the problem!

    The bbpress configuration file bb-config.php needs to be edited so that the name of the database reflects the global database name used by Multi-DB.

    If the global db name is 'foobar_global', the line needing editing would be:
    define( 'BBDB_NAME', 'foobar_global' );

    Since wp-config.php (which has similar defines) did not require edits, I never considered that bb-config.php might need any editing for Multi-DB.

    Thanks,

    Scott

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.