WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#39816 closed defect (bug) (invalid)

When non-super admin clicks "login" on Meta widget, he is sent to the root blog, not the one he is on.

Reported by: hallcp Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.2
Component: Database Keywords: close
Focuses: administration, multisite Cc:

Description

For example, when the admin for blog XXX (not a super-admin) brings up the blog:

http://aaa.bbb.ccc/blogs/XXX

and clicks on "login", he arrives here:

http://aaa.bbb.ccc/blogs/wp-admin

as opposed to:

http://aaa.bbb.ccc/blogs/XXX/wp-admin

Super-admins do not exhibit this bug. I have three multi-site installations and two exhibit this bug. All are WP 4.7.2 and have similar plugins.

I began to get reports of this after the 4.7.1 update.

Change History (5)

#1 @hallcp
5 years ago

I am now getting complaints that the "My Sites" pull-down is not showing any sites, despite the user being an administrator on multiple sites. Not sure if this is related to the above bug.

I have looked more deeply into the original issue, and it appears that a call to "get_blogs_of_user()" is returning null on the affected systems. I am trying to follow up on that now.

Charles.

#2 @hallcp
5 years ago

More digging... when calling "get_sites($args)" with a $args value like this (see below), null is returned:

(
    [number] =>
    [site__in] => Array
        (
            [0] => 1
            [1] => 9
            [2] => 4
            [3] => 13
            [4] => 473
            [5] => 413
            [6] => 313
        )
    [archived] => 0
    [spam] => 0
    [deleted] => 0
)
Last edited 5 years ago by SergeyBiryukov (previous) (diff)

#3 @hallcp
5 years ago

  • Component changed from General to Database
  • Keywords close added

You can close this ticket. The problem was that the "archived" column in our wp_blogs table had a corrupt value that displayed as "0" but would not be found when using the "WHERE archived=0" clause.

I have no idea how this column got corrupted, or what was really in the database, but setting non-one values to zero fixed everything.

You can't imagine how long it took to track this down!

#4 @rachelbaker
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

@hallcp Glad you finally tracked down the issue. Closing this ticket.

#5 @SergeyBiryukov
5 years ago

  • Focuses multisite added
Note: See TracTickets for help on using tickets.