Endless redirection loop when accessing Network Admin with multiple networks set up
|Reported by:||mwidmann||Owned by:|
I have 19 Blogs, divided in 3 Sites set up in WP 3.0.1 with the help of the wp-network-sites plugin. Site 1 has Blogs 1-5, Site 2 has blogs 6-14 and Site 3 has 15-19.
My normal working ground atm is Site 2, main blog 6.
With WordPress 3.1 beta I end up in an endless redirection loop when I try to access the network admin.
is_main_site (functions.php:3877, called from wp-admin/network/admin.php) checks whether a blog is the main blog for the network by checking its ID against the blog_id stored in $current_site. This is not filed if we are not on SITE_ID_CURRENT_SITE.
The check if $current_site->blog_id is set is done only once (ms-settings.php:52), but later on $current_site can be overwritten if certain criteria matches. In that case $current_site->blog_id is not initialized anymore and leads to the endless loops.
I provided a patch which hopefully will be applied soon.