[wp-trac] [WordPress Trac] #12028: wpmu_create_blog() breaks with multiple use

WordPress Trac wp-trac at lists.automattic.com
Tue Jan 26 00:16:14 UTC 2010


#12028: wpmu_create_blog() breaks with multiple use
--------------------------+-------------------------------------------------
 Reporter:  wpmuguru      |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  Multisite     |     Version:            
 Severity:  normal        |    Keywords:            
--------------------------+-------------------------------------------------
 MU Trac Ticket: http://trac.mu.wordpress.org/ticket/394

 When using wpmu_create_blog() in wpmu-functions.php it will only work
 once. If called additional times the blog will be added to the wp_blogs
 table but its tables will not be created, resulting in an invalid state.
 This is caused by $wp_queries being set in-line in upgrade-schema.php
 while it must be updated before the second call to wpmu_create_blog().
 This is solved by moving the initialization of $wp_queries into a function
 and calling it just before the tables are created (diff file attached).

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


More information about the wp-trac mailing list