[wp-trac] [WordPress Trac] #12648: Wpmu_create_blog fails if it is called multiple times

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 19 14:44:29 UTC 2010


#12648: Wpmu_create_blog fails if it is called multiple times
--------------------------+-------------------------------------------------
 Reporter:  jpotkanski    |       Owner:       
     Type:  defect (bug)  |      Status:  new  
 Priority:  normal        |   Milestone:  2.9.3
Component:  Multisite     |     Version:  2.9.2
 Severity:  normal        |    Keywords:       
--------------------------+-------------------------------------------------
 Test:
 ids[] = wpmu_create_blog($current_site->domain, '/test1/', 'Test Blog 1',
 1, array( "public" => 0 ), $current_site->id);
 ids[] = wpmu_create_blog($current_site->domain, '/test2/', 'Test Blog 2',
 1, array( "public" => 0 ), $current_site->id);
 ids[] = wpmu_create_blog($current_site->domain, '/test3/', 'Test Blog 3',
 1, array( "public" => 0 ), $current_site->id);

 Test Blog 1 will create fine.

 Test Blog 2 and 3 will be properly created in wp_blogs but will not have
 their local specific tables created.

 The bug is in the design of require_once upgrade.php in the install_blog
 function. Deep underneath this sets a global $wp_queries. Long term, the
 global $wp_queries NEEDS to be deprecated in favor of a function.

 The patch will regex replace the correct blog id if $wp_queries exists.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12648>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list