WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] "Network Admin" link redirecting to "http://wp-admin/network/" (27 posts)

  1. mrengy
    Member
    Posted 2 years ago #

    Site URL: http://www.abetterworldbydesign.com

    The "network admin" link in my dashboard is directing to http://wp-admin/network/ (obviously not a valid URL). Also, when typing in the URL of http://www.abetterworldbydesign.com/wp-admin/network, this also redirects to http://wp-admin/network/. So I am unable to get to my network admin dashboard.

    Also, after upgrading to WordPress 3.2.1, the message that says "Thank you for Updating! Please visit the Update Network page to update all your sites." links to http://wp-admin/network/upgrade.php. Typing in the URL of SITEURL.com/wp-admin/network/upgrade.php also redirects to http://wp-admin/network/upgrade.php

    I am actually having this issue on the production site in WP 3.1.4 and also the development site running WP 3.2.1.

    WordPress Multisite is running with subdirectories as opposed to subdomains. The network admin area had been working in the past, so I've been trying to backtrack to see where this error started. Not sure if it's a server issue or a WordPress issue.

  2. Could be a plugin conflict tho. I;d start by checking db values to make sure every place that needs to save the domain name actually has it in place.

  3. mrengy
    Member
    Posted 2 years ago #

    Okay, thanks. Where specifically in the database should I be checking?

  4. wp_site, wp_sitemeta, wp_options (and really all wp_X_options)

  5. mrengy
    Member
    Posted 2 years ago #

    1. wp_site: domain = http://www.abetterworldbydesign.com | path = /
    2. wp_sitemeta: meta_value[siteurl] = http://www.abetterworldbydesign.com/
    3. wp_options: option_name[siteurl] = http://www.abetterworldbydesign.com
    4. wp_3_options: option_name[siteurl] = http://www.abetterworldbydesign.com/2010/

    wp_3 represents the only other WordPress blog (other than the root) that I currently have in this install of WP Multisite.

    Only discrepancy I noticed is that #2 has a trailing slash and #3 does not. Not sure what these values should be specifically, but everything looks as expected with my limited knowledge of what the database should look like.

  6. mrengy
    Member
    Posted 2 years ago #

    I've been communicating with tech support at my web host about this. They've looked into things, and they've been stumped. Here's the info they provided me from what they found though.

    "The issue here is that the value returned by network_admin_url(); when called by your blog isn't correct. I'm not sure where or how this is stored in your database."

    Any idea where the value returned by network_admin_url(); is stored in the database?

  7. Any idea where the value returned by network_admin_url(); is stored in the database?

    It's built on the fly.

    What's the value in wp-config.php for DOMAIN_CURRENT_SITE?

  8. mrengy
    Member
    Posted 2 years ago #

    define( 'DOMAIN_CURRENT_SITE', 'www.abetterworldbydesign.com' );

  9. rickleijtencom
    Member
    Posted 2 years ago #

    Might check your htaccess, it prolly rewrite wrong aswell.

    Whats the value in wp-config of patch_current_site, site_id & blog_id_current_site ?

  10. mrengy
    Member
    Posted 2 years ago #

    .htaccess code:

    # BEGIN WordPress
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress

    select lines from wp-config.php:

    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'www.abetterworldbydesign.com' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
  11. And you have define('WP_ALLOW_MULTISITE', true); in there too? Shouldn't matter but...

  12. wp_site: domain = http://www.abetterworldbydesign.com | path = /

    this table should not have the http:// in it.

  13. It may not (the forums add it in if you put www . domain . com in :/ )

  14. mrengy
    Member
    Posted 2 years ago #

    @Ipstenu - good call. The forum did add the http:// to my value for wp_site: domain. It actually reads www(dot)abetterworldbydesign(dot)com in the database.

    As for WP_ALLOW_MULTISITE, the support team at HostGator did some tinkering with it. that line currently reads:

    define( 'MULTISITE', true ); //hg commented this, to be replaced by next line:
    //define( 'WP_ALLOW_MULTISITE', true );

    Toggling the commented lines to:

    //define( 'MULTISITE', true ); //hg commented this, to be replaced by next line:
    define( 'WP_ALLOW_MULTISITE', true );

    causes a "Error establishing database connection" message in the browser.

    Here's my entire wp-config.php in pastebin (secure items replaced with "###").

  15. Try this:

    define( 'MULTISITE', true );
    define( 'WP_ALLOW_MULTISITE', true );

    Yes, both.

  16. mrengy
    Member
    Posted 2 years ago #

    Thanks all for the replies. Okay, I've changed those lines in wp-config.php to

    define( 'MULTISITE', true );
    define( 'WP_ALLOW_MULTISITE', true );

    I've also updated it in pastebin.

    The front end of the site is behaving normally, but I'm still having the issue originally described with the "network admin" URL.

  17. As for WP_ALLOW_MULTISITE, the support team at HostGator did some tinkering with it. that line currently reads:
    define( 'MULTISITE', true ); //hg commented this, to be replaced by next line:
    //define( 'WP_ALLOW_MULTISITE', true );
    Toggling the commented lines to:
    //define( 'MULTISITE', true ); //hg commented this, to be replaced by next line:
    define( 'WP_ALLOW_MULTISITE', true );

    Oh my LORD. Will you please tell HG support that those two lines do *two different things*? You need both of them. One of them very specifically tells wordpress that multisite is in use.

    What happens when you go to http://www.abetterworldbydesign.com/wp-admin/network/ ?

    And yes. it's something specific to your install that is borking. JUST to get that out there, in case support needs to know. :P

  18. mrengy
    Member
    Posted 2 years ago #

    Don't get me started on HG support. I've given up hope on them long ago.

    http://www.abetterworldbydesign.com/wp-admin/network/
    redirects to
    http://wp-admin/network/

  19. any uppercase letters in the domain name anywhere?

  20. mrengy
    Member
    Posted 2 years ago #

    Nope. At least not in the database tables I checked in this post. I also did a quick scan through the database for any other fields in the database that contained the domain and didn't find any.

  21. mrengy
    Member
    Posted 2 years ago #

    Sounds as though it might be related to http://core.trac.wordpress.org/ticket/17168

    However, I'm not sure how to proceed.

  22. That was more related to people who get redirected to the NON www version of their url. yours is being removed entirely. :-/

  23. mrengy
    Member
    Posted 2 years ago #

    Another HostGator support rep (who seems to be quite a bit more competent) has picked up the ticket. Here's the info he provided:

    "In the file: wp-includes/link-template.php on about line 2168 there is the definition for the function named 'network_site_url', which is essentially where the invalid URL gets generated. In that function, there is a line:

    $url = $scheme . '://' . $current_site->domain . $current_site->path;

    This is where the glitch occurs, as the variable $current_site is completely empty."

    Does that help?

  24. Marginally. :) Now we have to determine why, on your site, $current_site is empty.

  25. mrengy
    Member
    Posted 2 years ago #

    Eureka.

    I had written a function in my theme's functions.php to store the current version of the site I was working on "production", "stage", "dev", or "local". Not knowing that WordPress core used the variable "$current_site", I named my custom variable "$current_site", and it was overwriting the value that should have been there.

    I did this as a workaround because the Simple Fields plugin, while awesome, doesn't support displaying images by title - it requires calling their IDs (which vary from production to stage to dev to local) to display. I wrote a post on the plugin forum about this.

    Changing the "$current_site" variable in my theme to "$site_version" resolved the issue.

  26. Glad you found it.

  27. mrengy
    Member
    Posted 2 years ago #

    Couldn't have done it without all of your help. Many thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic