georgef
Expert
Super Volunteer
Member Likes (0)
Been trying to install an Advertising plugin which keeps on creating the tables in my C database instead of Global while running MultiDB.
The plugin doesnt find the tables in C and asks to add the tables manually. I then run the MySql code in the global database after I've deleted the tables in C..
When that is done, it appears that the plugin is working, but every time I save anything it keeps the defaults of data that was created in my C database.
I've tried all angels but not sure how I can stop the tables from being created in the C database.
Anyone experienced something similar and know how I can fix this?
I have tested the plugin on WP 3.0 and it works fine.

Responses (14)
Erstwhile founder (joined May 2007) Likes (0)
Have you added the table to db-config.php?
Thanks,
Andrew
Member (joined August 2009) Likes (0)
Yes. Here are the steps that I've tried:
First time round, I installed the plugin as per normal. A screen came up mentioning that the DB couldnt be found and gave the code for the 3 tables to be added.
I ran the SQL then added those tables to db-config.php
That didnt work, as the tables were already created in my C db.
Then deleted all the tables, and ran the SQL code first to create the tables before reinstalling the plugin after deleting it.
But even when doing that, the tables still get created in C as soon as the plugin gets activated.
Even with the tables in db-config.php and the tables created in the global db first, it still creates the tables in C.
I did notice that they use a different prefix, wp_1_ could that have an effect on it?
Erstwhile founder (joined May 2007) Likes (0)
Did you remember to leave off the prefix when adding the tables to db-config.php?
Thanks,
Andrew
Member (joined August 2009) Likes (0)
Yes. That was a problem at first as I included the 1_, but have them now as
#OIO Publisher
add_global_table('oiopub_config');
add_global_table('oiopub_purchases');
add_global_table('oiopub_affiliates_hits');
add_global_table('oiopub_purchases_history');
add_global_table('oiopub_affiliates_sales');
add_global_table('oiopub_tracker_archive');
add_global_table('oiopub_tracker_clicks');
add_global_table('oiopub_tracker_visits');
add_global_table('oiopub_affiliates');
This plugin works with its own config file.
Is there any way I can just configure this (or any) plugin that it works with the C instead of Global?
Might be a dumb question but I just don't know.
So where i add local host, db user, pass, etc just point it to C?
Or is there anything else I can check?
Member (joined August 2009) Likes (0)
O and I know a link would help generally, but it's a paid plugin... http://www.oiopublisher.com/
Lead Developer (joined May 2009) Likes (0)
A normal WP plugin that you only activate per blog will put it's tables along with that blogs. The behavior you're experiencing is correct.
Only wpmu plugins with global tables you should put in the global table.
Member (joined August 2009) Likes (0)
That's what I thought, but when I just activate the plugin, it creates the tables in C db, but I get a plugin error saying that it cant find the tables (although created in C)
and gives me the mysql code to run.
So I guess its creating the tables correctly in C, but then not finding it?
Member (joined August 2009) Likes (0)
Would it make any difference if I rerun the mysql code then in the C database? Maybe I"m missing something here...
Lead Developer (joined May 2009) Likes (0)
It may not be wpmu compatible. A number of poorly designed plugins that use custom db tables are'nt. Are you seeing any sql errors in your logs?
Perhaps it's hardcoding the prefix for tables on reads but not creation.
Member (joined August 2009) Likes (0)
Nothing in the error logs.
This is from the FAQ:
I have been talking to the developer in the forum there to try resolve it as well.
Here's the last response that might be relevant?
Lead Developer (joined May 2009) Likes (0)
That's the problem. They are not using the $wpdb class so it is not compatible with multi-db as they are basically pulling the db login details from wp then trying to do everything themselves. As they are skipping wpdb they have no logic to know which db to read from.
Member (joined August 2009) Likes (0)
Well spotted thanks Aaron.
Keeper of the Dark Chocolate (joined July 2007) Likes (0)
Hmmm, didn;t know that.
Keeper of the Dark Chocolate (joined July 2007) Likes (0)
If anyone is keeping track at home, this is topic #5000.
And I thought I was getting there....
Become a member