• Resolved Nipefy

    (@nipefy)


    Hi,

    I setup a new multisite installation using subdomains rather than directories. However – now when my users login via:

    Mysite.com/wp-login.php
    They get directed to mysite.com/wp-admin and get “You do not have sufficient permissions to access this admin page”

    They should be redirected to
    theirblog.mysite.com/wp-admin/

    I didn’t have this issue when using directories instead of subdomains?? Anyone who knows what’s wrong?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I didn’t have this issue when using directories instead of subdomains??

    You did if they were logging in at mysite.com/wp-login.php and NOT mysite.com/theirblog/wp-login.php

    You have to put in a redirect: https://www.ads-software.com/support/topic/automatic-redirection-to-child-site-from-main?replies=15

    Thread Starter Nipefy

    (@nipefy)

    You did if they were logging in at mysite.com/wp-login.php

    No I don’t. I have 2 other installations where it works fine this way. I have the same plugins and settings on all multisite installs. Only on the subdomain site, it doesnt redirect to users dashboard from mysite.com/wp-login.php.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    *BLINK* Well THAT is weird. That shouldn’t be the case. I just built a subfolder site to test and you’re right. My apologies!

    Okay, looking at the login page code, this is right:

    // If the user doesn't belong to a blog, send them to user admin. If the user can't edit posts, send them to their profile.
    		if ( ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' || $redirect_to == admin_url() ) ) {
    			// If the user doesn't belong to a blog, send them to user admin. If the user can't edit posts, send them to their profile.
    			if ( is_multisite() && !get_active_blog_for_user($user->ID) && !is_super_admin( $user->ID ) )
    				$redirect_to = user_admin_url();
    			elseif ( is_multisite() && !$user->has_cap('read') )
    				$redirect_to = get_dashboard_url( $user->ID );
    			elseif ( !$user->has_cap('edit_posts') )
    				$redirect_to = admin_url('profile.php');
    		}

    So it’s almost like is_multisite() isn’t working right o.O

    I’m going to dig into this and make a bug if needed.

    Edit; Made bug https://core.trac.www.ads-software.com/ticket/30598#ticket

    Thread Starter Nipefy

    (@nipefy)

    So I am right that on multisites with subdomains, the users aren’t correctly redirected to their dashboards? – But when multisite uses subfolders they are?

    I will await for more info, thanks for reporting the bug, if it is a bug.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You’re right. And it’s inconsistent. There SHOULD be parity, or a reason why it’s not :/

    We mark posts that have trac tickets as resolved for sanity. It lets mods and volunteers know we don’t have to jump in and find an issue. You should follow the discussion on trac. You can click the ‘Watch’ button on the trac ticket (it’s near the bottom) to get email alerts. If you need to log in, it’s the same ID/password as you use for the forums.

    Thread Starter Nipefy

    (@nipefy)

    Seems like a week went on and nothing happened?

    Thread Starter Nipefy

    (@nipefy)

    Still no news??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Please LEAVE this post resovled.

    The bug is waiting on a developer who can fix it to … well … fix it. This is open source. You have to wait for people sometimes.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Users don't get redirected to their blog dashboard when login’ is closed to new replies.