Plugin not working with Multi-DB

I installed a plugin (rootsPersona) and it's having database issues. I can see what the issue is but not sure how to address the blog databases correctly. Here's how it looks:

1. I'm using Multi-DB with 256 databases.

2. The blog I'm testing with has its tables in the database mysite_blogs_ec

3. The tables are named like wp_3_comments, wp_3_options etc

4. The error is Table 'mysite_blogs.wp_3_rp_indi' doesn't exist

I don't know a whole lot about WPMU specifically, but it seems that the plugin has detected that I'm using WPMU but is not picking up the multiple databases (i.e. it is expecting a standard WPMU configuration)?

Gary

  • teckyhead

    If only it were that simple :slight_smile:. No, this is an installed plugin. It has actually created the tables in the correct database. However, when I try to go to the options page for the plugin, it throws that error. That error refers to a table missing in the global database - which isn't the correct database (it should be mysite_blogs_ec rather than mysite_blogs.

    So, it's almost as if the plugin installation function that creates the tables is finding the correct database, but some other functions aren't referencing the correct database name.

    What I don't know is how it finds that database name. It seems to be using the correct $wpdb->prefix setting, but not the correct Multi-DB database in some places.

    Gary

  • teckyhead

    The name of the plugin is in my original post. It is called rootsPersona.

    It installs its tables in the correct multi-site db.

    When I try to access its settings from the dashboard it appears to be looking for the tables in the global db, which causes the error.

    I've been a developer for many years and have written wordpress plugins - but nothing for multisite, so I'm looking for some pointers as to what (in PHP code) defines the database that a specific MU blog uses. My guess is that the installation of the tables is MU friendly but there's something amiss in the code that queries the db for the plugin settings.

    Gary

  • teckyhead

    Hi Kimberly,

    No - no progress unfortunately. I was hoping someone who has experienced this sort of issue might have some pointers. It seems that it installs the tables into the correct db (mysite_blogs_ec) but the admin functions are trying to use the tables from the global database (mysite_blogs) - which throws an error because the tables are where they should be ... in mysite_blogs_ec.

    I have no idea how Wordpress is told which database is mapped to which MU site other than the db config file and, more importantly, how that might affect the relevant API functions (which presumably have to be made aware of the MultiDB config somehow).

    Regards,

    Gary

  • aecnu

    Greetings teckyhead,

    I would suggest that if you know which tables are giving the error and the plugin is looking for those table in globals (it appears the plugin is not MultiSite aware) - perhaps a work around would be to create those particular "missing" tables in globals and fill in the current data if any.

    To help ease the pain and assist managing the database, I offer you to download in what is in my opinion the greatest Database Management software of all time Navicat. You can drag and drop the missing tables right into globals to see if that makes a difference/fixes it.

    Even with WPMU Dev plugins it is necessary to add lines to the db-config.php file in order for them to work properly i.e. add_global_table('system_faq');

    Therefore since this plugin did not mention it to the best of my knowledge perhaps this work around will make it all work.

    Cheers, Joe :slight_smile:

    If this thread is not resolved because the suggested action did not work or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.