WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#15591 closed defect (bug) (fixed)

Endless redirection loop when accessing Network Admin with multiple networks set up

Reported by: mwidmann Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: Multisite Keywords: has-patch commit
Focuses: Cc:

Description

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.

Attachments (1)

ms-settings.php.diff (997 bytes) - added by mwidmann 5 years ago.

Download all attachments as: .zip

Change History (5)

@mwidmann5 years ago

comment:1 @nacin5 years ago

  • Milestone changed from Awaiting Review to 3.1

comment:2 @scribu5 years ago

  • Keywords has-patch added

comment:3 @scribu5 years ago

  • Keywords commit added

Patch seems to work well.

comment:4 @PeteMall5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [16633]) Address redirection loop with multiple networks and network admin. Props mwidmann, fixes #15591

Note: See TracTickets for help on using tickets.