scharles
Sophomore
Just Getting Started
Member Likes (0)
Hi,
I am still testing Multi-DB, version 2.7.1 suppose to fix this issue, but not for me!
to make sure, I create a fresh MU Install (also 2.7.1) - created few blogs and then tried to delete, visually blog is removed since its removed from the global tables but all blog specific tables are left in the database..
_comments
_links
_options
_....
I am using 16 db config

Responses (12)
Developer (joined June 2008) Likes (0)
Hi
Thanks for the heads up, we are using a slightly modified version over at blogs.mu that removes the tables correctly. I will do a check for relevant differences and post the changes required here until we can get a new version of the multi-db class up for download.
Rgds
Barry
Member (joined April 2009) Likes (0)
Update:
After debugging a bit I noticed that $drop_tables on line 50 of mu.php is empty!
And surely that's why the blog tables does not get deleted.
Dont you think its related to Multi-DB?
Basically show tables fails here "$drop_tables = $wpdb->get_results("show tables LIKE '". $wpdb->base_prefix . $blog_id . "\_%'", ARRAY_A);"
I am very new to WPMU, and PHP so I might be wrong here.
Developer (joined June 2008) Likes (0)
I think it may be the multi-db system, or more specifically a combination of that and the strangely formated sql statement used in the delete_blog function.
"SHOW TABLES LIKE 'WP_1\_%'
Give me a few minutes and I'll track down the required changes
Member (joined April 2009) Likes (0)
Ok, I found the problem.
Here: $drop_tables = $wpdb->get_results("show tables LIKE '". $wpdb->base_prefix . $blog_id . "\_%'", ARRAY_A);
My osx server php engine seems to parse "\_%" differently as it might on other OS's, it does not see "\" as an escape and simply create an invalid query "show tables LIKE 'wp_3\_%'" resulting in this warning "PHP Warning: reset() [function.reset]: Passed variable is not an array or object in /Library/WebServer/Documents/broadkast/wp-admin/includes/mu.php on line 51"
I had to remove \ and from the query to make it work on osx panther.
I just wanted to post here anyways, I know this is a WPMU issue and not a Multi-DB - atleast I know now ;)
Cheers,
Sam
Member (joined April 2009) Likes (0)
@cafespain just missed your reply :)
Please let me know your findings, and if its also related to the OS.
Developer (joined June 2008) Likes (0)
Removing the \ is certainly part of the solution, not 100% sure why it is in the query in the first place. I have certainly never come across that SQL syntax before.
The other part is to edit the following lines in db.php:
Line 929 should become:
Line 931 should become:
Note the only changes to those two lines from the originals is a ? added towards the end of each preg_match string.
Member (joined April 2009) Likes (0)
Thanks, I will test this more in next few days.
Keep you posted.
Member (joined March 2008) Likes (0)
Followed the above steps and now I got this fatal error :
Fatal error: Call to undefined function wp_get_current_user() in /home/s28632/public_html/wp-includes/capabilities.php on line 920
Need advice. Thank you.
Member (joined March 2008) Likes (0)
Resolved it already. Thank you.
Member (joined June 2009) Likes (0)
Kweechek and Scharles, I'm experiencing similar problems, see my posting here: http://premium.wpmudev.org/forums/topic/php-warnings-when-deleting-a-new-blog-after-installing-multi-db
Could you please elaborate a bit on how you managed to solve the problem?
Many thanks!
Paul
Member (joined June 2009) Likes (0)
Hi,
I have had the same problem on wpmu 2.7.1 fresh installed + multi-db,
when deleting a blog as the site admin user.
Resolved editing db.php as suggested by cafespain.
Thank You for the suppord
Erstwhile founder (joined May 2007) Likes (0)
Hiya,
This problem is fixed in the latest version of Multi-DB (WPMU 2.8+ compatible).
Closing this thread since the issue is resolved.
Thanks,
Andrew
Thanks for viewing this post but this topic has been closed to new replies.
Become a member