[wp-trac] [WordPress Trac] #20174: populate_network() doesn't set up rewrite rules properly

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 4 12:28:19 UTC 2012


#20174: populate_network() doesn't set up rewrite rules properly
--------------------------+-----------------------------
 Reporter:  duck_         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Multisite     |    Version:  3.0
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 The call to flush_rewrite_rules() in populate_network() doesn't actually
 do much because although the lines before update the permalink_structure
 this doesn't actually change the value cached in the WP_Rewrite property.

 This means that incorrect rewrite rules are stored for the main site when
 setting up a network. NB: this only occurs when the permalink structure
 had already been set to something before installing the network.

 The fix would be to use $wp_rewrite->set_permalink_structure which updates
 the option and re-initializes the $wp_rewrite global to use the new
 structure.

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


More information about the wp-trac mailing list