• I’ve got WP 3.0.5 running in a subdomain install, with the domain mapping plugin. It’s been working fine. I created up 5 blogs initially, and then installed the subdomain mapping plugin, and got it working fine. Several weeks passed, with writing and plugin isntallation/removal and all the other little changes that take place over time, and now I’m trying to create another new site, and it’s failing.

    When I look at the DB tables, the information for the new site is showing up in the Network wide tables (wp_blogs, etc) but it’s failing to create the new wp_N_posts, wp_N_comments, (etc) tables that would hold the content for that particular blog. The DB user has all privileges on the table of the blog DB, and I don’t see any explicit errors showing up in the debug.log pertaining to the table creation — though a huge number of them appear when it tries to actually *do* anything with those (non-existent) tables.

    Any ideas?

Viewing 15 replies - 31 through 45 (of 59 total)
  • Are you using the free domain mapping plugin?

    There’s 3 that I know of, so specifying helps. ??

    Thread Starter zaneselvans

    (@zaneselvans)

    Sorry, yes, I’m using the free one, didn’t know there were others. It’s the one that drops sunrise.php into wp-content and domain_mapping.php into mu-plugins, from here: https://www.ads-software.com/extend/plugins/wordpress-mu-domain-mapping/

    Have you upgraded it?

    Plugins dropped into mu-plugins do not send upgrade notices, so you have to do them manually.

    (FWIW, the other mapping plugins install the same way. ?? )

    Thread Starter zaneselvans

    (@zaneselvans)

    Nope, I hadn’t, was one version behind (0.5.3 vs 0.5.4), but upgrading didn’t get rid of the issue.

    @zaneselvans can you show the wrapper function and usage codes?

    Stab in the dark: did you change the db collation recently? Can you check?

    Exactly the same problem here. DB collation seems fine.

    @blackriver did you read through the entire thread and try all the other things mentioned?

    Yep, absolutly. From what I understand the solution has not been posted yet, and the patches mentioned above are not for the current WP version.

    So to recap:

    – you checked that the db user has ALL permissions
    – you’ve disabled any and ALL plugins and tried again
    – you’ve checked the db to verify no new tables are created

    Did it work at one point and is failing now?
    Are you using the domain mapping plugin?

    Also the patches mentioned above would still apply.

    The patches are for wpmu-functions.php which does not exist anymore, I am using 3.1.2. @zaneselvans were you able to come up with a solution for this?

    Currently I am not even using the domain mapping plugin.
    I do receive the notification that the new site was created and there is a new entry in the blogs table, however new prefix tables are not being created.

    Look for ms-functions.php.

    Also
    – you checked that the db user has ALL permissions?

    Everyone who has ever had this issues had a slight different cause each time.

    Have you talked to your web host and told them new tables aren’t being added to the db? (this is all server-side action. WP just tells it what to do.)

    In this case I am the web host. I am just really curious if zaneselvans got to any resolution with this.

    Here is the patch for the latest ms-functions.php (for WP 3.1.2) that resolved this issue for me:

    @@ -1042,6 +1042,7 @@
      * @return mixed Returns WP_Error object on failure, int $blog_id on success
      */
     function wpmu_create_blog($domain, $path, $title, $user_id, $meta = '', $site_id = 1) {
    +        global $wpdb, $wp_queries;
     	$domain = preg_replace( '/\s+/', '', sanitize_user( $domain, true ) );
    
     	if ( is_subdomain_install() )
    @@ -1064,6 +1065,14 @@
     		return new WP_Error('insert_blog', __('Could not create site.'));
    
     	switch_to_blog($blog_id);
    +
    +         if($wp_queries){
    +            //$pattern = '/' . $wpdb->base_prefix . '(\d+)/';
    +            $pattern = $wpdb->base_prefix;
    +            $prefix = $wpdb->base_prefix . $blog_id . '_';
    +            $wp_queries = str_replace($pattern, $prefix, $wp_queries); //preg_replace($pattern,$prefix, $wp_queries);
    + 	}
    +
     	install_blog($blog_id, $title);
     	wp_install_defaults($user_id);
Viewing 15 replies - 31 through 45 (of 59 total)
  • The topic ‘DB tables for new subdomain site fail to get created’ is closed to new replies.