Wrong network admin URL (7 posts)

  1. ssorrenti
    Posted 4 years ago #

    Hi all

    I am having an issue where I cannot access the network admin dashboard or sites pages under my sites, because the URL of the link is incorrect.

    When I correct this error by changing ( 'PATH_CURRENT_SITE','' ); to define( 'PATH_CURRENT_SITE','/" ); i get a database error and cannot access the site at all.

    Can anyone help because I am desperate to get this resolved so I can start creating new sites.

  2. ssorrenti
    Posted 4 years ago #

    This is the code I need to change from index.php, but I am not sure how to go about it.

    <li id="wp-admin-bar-network-admin-d" class=""><a href="http://learn.stleonards.vic.edu.au">Dashboard</a>
    		<li id="wp-admin-bar-network-admin-s" class=""><a href="http://learn.stleonards.vic.edu.ausites.php">Sites</a>
    		<li id="wp-admin-bar-network-admin-u" class=""><a href="http://learn.stleonards.vic.edu.auusers.php">Users</a>
    		<li id="wp-admin-bar-network-admin-v" class=""><a href="http://learn.stleonards.vic.edu.au">Visit Network</a>		</div>
  3. ssorrenti
    Posted 4 years ago #

    I have the sites accessible by manually changing the URL from network_admin_url to the FDQN, but it appears that are far too many places to make it easy to change.

    Can anyone help with changing the variable network_admin_url ?

  4. URL of the link is incorrect.

    What should it be and what are you seeing instead?

    Also did you use www.domain.com for your site or domain.com

  5. ssorrenti
    Posted 4 years ago #

    The domain I am using is not the issue. The issue is that the relative path that is converted to an FQDN by the network_admin_url variable?

    I cannot locate this in the database or in the php files.

    Can anyone help with this?

  6. The domain I am using is not the issue.

    I know that. What I asked is if you used www.domain.com or domain.com for your site. I know domain.com isn't your domain. Is it learn.stleonards.vic.edu.au? Or is that a subsite?

    Because, guess what, there is known issue in rare cases, following an upgrade, where people with www in their domain names get ganked like that. And if you happen to have a more complex subdomain as your main site, and it's happening to you, we now have more information.

    But since you seem to feel you know better, please yourself.

  7. ssorrenti
    Posted 4 years ago #

    I think this function is the issue. Can anyone help with this?

    function network_admin_url( $path = '/', $scheme = 'admin' ) {
    if ( ! is_multisite() )
    return admin_url( $path, $scheme );

    $url = network_site_url ('/', $scheme);

    if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
    $url .= ltrim($path, '/');

    return apply_filters('network_admin_url', $url, $path)

Topic Closed

This topic has been closed to new replies.

About this Topic