The MU forums have moved to WordPress.org

Cannot access Control Panel since WPMU2.6b1 (43 posts)

  1. DragonFlyEye
    Member
    Posted 15 years ago #

    I've been discussing this in another thread, but I thought I'd start a new one in case anyone else is having this problem and/or can help shed light. Here are the symptoms:

    • Since installing the new beta and not before, I've been unable to access the Control Panels of any of my non-root blogs (meaning the blog at holisticnetworking.net is fine, but the blog at holisticnetworking.net/plugins is not accessible).
    • I've checked the cookies and they are definitely getting set when I login from any login screen (root blog or otherwise). However, when I attempt to access the Control Panels of any of the sub blogs, I get the logon screen again. Logging in yields no error messages, sets cookies correctly if they aren't already, but still brings me right back to the logon screen. This does not, therefore, appear to be an authentication issue.
    • I've discovered this thread, which says that redirecting domain.com to http://www.domain.com yields the same behaviour. However, I'm confused why this didn't pose a problem with any previous version of WPMU and is suddenly a problem with this new version. What changed?

    Thanks to anyone who can help. It should be noted that I've completely deleted everything off the server, save for the database, and installed the latest version in Trak as of last night. This has not resolved the issue.

  2. lunabyte
    Member
    Posted 15 years ago #

    Did you run the upgrade under site admin?

    Anything in the error logs?

  3. andrea_r
    Moderator
    Posted 15 years ago #

    "but the blog at holisticnetworking.net/plugins is not accessible"

    try putting in a trailing slash?

  4. DragonFlyEye
    Member
    Posted 15 years ago #

    @lunabyte ~ Yes, I've run the upgrade.
    @andrea_r ~ Tried the slash. The problem is that the Control Panel of the blog is what is not accessible. It's not accessible because I'm getting the login screen.

  5. DragonFlyEye
    Member
    Posted 15 years ago #

    @lunabyte ~ Not seeing anything in error logs, either. Cookies are being set, also. Hmm. . .

  6. DragonFlyEye
    Member
    Posted 15 years ago #

    OK, I asked Donncha about this in the other thread, but let me run this past some others:

    When I log into the sub-blogs (which, by the way, are subdirectories, not subdomains), I get cookies set. However, tell me if this looks right to you:

    name: wordpress_
    content: <<password hash>>
    domain: .holisticnetworking.net
    path: /design/wp-content/plugins
    send for: Any type of connection
    expires: at end of session

    OK, so far, so good. But check out this other one:

    name: wordpress_
    content: <<password hash>>
    domain: .holisticnetworking.net
    path: /wp-admin
    send for: Any type of connection
    expires: at end of session

    Shouldn't that second one be set to /design/wp-admin? I mean, I realize that the literal path on the server is just /wp-admin, but it's also just /plugins, yet there is a difference. Rrg.

  7. MrBrian
    Member
    Posted 15 years ago #

    Get this so you can edit the cookie's path. Try changing it to "/", see what happens.
    https://addons.mozilla.org/en-US/firefox/addon/573

  8. wehican
    Member
    Posted 15 years ago #

    Is that period in front of holisticnetworking supposed to be there?

    "domain: .holisticnetworking.net"

  9. wehican
    Member
    Posted 15 years ago #

    Visiting http://holisticnetworking.net shows this in the sidebar on the right under Topics:

    Fatal error: Call to undefined function: mu_tag_cloud() in /homepages/44/d118403290/htdocs/hn/home/wp-content/themes/hn_20/sidebar.php on line 5

  10. DragonFlyEye
    Member
    Posted 15 years ago #

    @MrBrian ~ Got the add-on, edited the cookie (I assume you meant the one pointing to /wp-admin) and didn't change.

    @wehican ~ Yeah, unrelated template issue. I've been using the MU Sitewide Tags thing, but installed a clean, no-plugins WPMU whilst working on the problem. Don't need any extra complications!

  11. DragonFlyEye
    Member
    Posted 15 years ago #

    @wehican ~ Yes, the period is supposed to be there. That makes the domain scope of the cookie include all subdomains.

  12. MrBrian
    Member
    Posted 15 years ago #

    I followed the code and based on your symptoms, wordpress is saying your authentication cookies are bad. You'll need to debug the function wp_validate_auth_cookie inside of wp-includes/pluggable.php to see exactly what is causing it to return false. Hopefully you have some basic php debug experience.

  13. MrBrian
    Member
    Posted 15 years ago #

    Looking deeper, it might be caused by your object cache. Make sure you delete the entire cache folder in wp-contents, and also try clearing the object cache with this function wp_cache_flush() and making sure the cache is set to FALSE in your config file;

  14. DragonFlyEye
    Member
    Posted 15 years ago #

    Hey, MrBrian, thanks for the help.

    The cache is no longer set in wp-config.php, and I've confirmed that there's nothing in there about caching. I've been using (prior to my problems) wp-super-cache and I deleted the cache file associated with that and tried again. Didn't work.

    I'll have to dig into the wp_validate_auth_cookie function a little later and figure out what's wrong. Thanks for the help!

  15. DragonFlyEye
    Member
    Posted 15 years ago #

    Update: whilst playing around with the wp_validate_auth_cookie function, I've determined that - for whatever reason - the wordpress_ cookie is not accessible in the $_COOKIE global variable. I created a little mu-plugin that would override the pluggable function which you can download here:

    http://downloads.holisticnetworking.net/testing_cookies.php

    When someone logs in, the function always craps out at the same output:

    2008-07-16:11:20.19 am,EDT - 5 - No global cookie assigned! Looking for cookie named:wordpress_
    	Cookie: wordpress_test_cookie
    		Values: WP Cookie check
    	Cookie: wordpress_logged_in_
    		Values: admin|<<numbers>>|<<hash>>

    However, if I look at my cookies, there are in fact two cookies with this same name:

    name: wordpress_
    content: admin%7C<<number>>%7C<<hash>>
    domain: .holisticnetworking.net
    path: /wp-admin
    
    name: wordpress_
    content: admin%7C<<number>>%7C<<hash>>
    domain: .holisticnetworking.net
    path: /design/wp-content/plugins

    I'm not sure where to proceed next. Any help anyone could give me would be appreciated. Thanks!

  16. lunabyte
    Member
    Posted 15 years ago #

    Did you clear the cookies and try again? It seems that's been a big sticking point in WP land with 2.6.

  17. MrBrian
    Member
    Posted 15 years ago #

    You'll need to make that a text file so we can see the php code :)

    Maybe your php version or browser?

  18. DragonFlyEye
    Member
    Posted 15 years ago #

    Cleared cookies, no change. Tried IE, no change.

    Any other ideas? I don't get why this is suddenly a problem with the new version.

    Maybe I'll install the release candidate and see if anything changes. . .

  19. DragonFlyEye
    Member
    Posted 15 years ago #

  20. lunabyte
    Member
    Posted 15 years ago #

    It's been quite the problem with the single user version as well.

    I had a local test site with 1.3.3 on it. Did an upgrade to the 2.6 beta without issues at all.
    Skipped 1.5 all together, and it seems to have worked just fine.

    Haven't done a 1.5->2.6 yet, though.

  21. DragonFlyEye
    Member
    Posted 15 years ago #

    w00t! I was just about to upgrade a friend's installation of WP single. Good thing you told me!

    Well, looks like there's a pretty serious bug in 2.6, then. I'll keep my eye on those forums and see if a solution gets posted.

    Thanks for all your help, lunabyte.

  22. DragonFlyEye
    Member
    Posted 15 years ago #

    Hey, has anyone tried to go *back* to 1.5.1 and see what happens? I'm a bit nervous to try it, myself, but it might be the only way to get my users back in action.

  23. MrBrian
    Member
    Posted 15 years ago #

    Post all your wordpress cookies, then post the output of $_COOKIE array from the function you wrote and paste the full URL you enter.

  24. DragonFlyEye
    Member
    Posted 15 years ago #

    1. Clear all cookies
    2. Go to: http://holisticnetworking.net/design/wp-login.php
    3. Enter creds
    4. Cookies:
    `bb2_screener_
    1216351592+66.66.188.145
    holisticnetworking.net
    /design/

    wordpress_
    admin<<hashes>>
    .holisticnetworking.net
    /design/wp-content/plugins

    wordpress_
    admin<<hashes>>
    .holisticnetworking.net
    /wp-admin

    wordpress_logged_in_
    admin<<hashes>>
    .holisticnetworking.net
    /

    wordpress_test_cookie
    WP+Cookie+check
    .holisticnetworking.net
    /`

    5. Output from plugin:

    2008-07-17:11:26.32 pm,EDT - 5 - No global cookie assigned! Looking for cookie named:wordpress_
    	Cookie: bb2_screener_
    		Values: 1216351592 66.66.188.145
    	Cookie: wordpress_test_cookie
    		Values: WP Cookie check
    	Cookie: wordpress_logged_in_
    		Values: admin|1216524391|cb2a446353384407ed73d9242ea3dc8f

    I note also that there's two cookies named wordpress_, is this expected?

    One last bit: after logging in, I get redirected to this URL:
    http://holisticnetworking.net/design/wp-login.php?redirect_to=http%3A%2F%2Fholisticnetworking.net%2Fdesign%2Fwp-admin%2F
    Which is, of course, the behaviour one would expect if WordPress sent me to the admin panel then checked the cookies and finding none it likes, dumps me back at the logon.

  25. MrBrian
    Member
    Posted 15 years ago #

    wordpress_
    admin<<hashes>>
    .holisticnetworking.net
    /wp-admin

    should be:

    wordpress_
    admin<<hashes>>
    .holisticnetworking.net
    /design/wp-admin

    The path is being set wrong by WPMU, that's gotta be it. I'll look at the code a bit and see if i can spot the bug, but you're right. I think wpmu forgot about the site path.

  26. MrBrian
    Member
    Posted 15 years ago #

    Well looking at the code, i don't see any bug. I think your database path is set wrong. check your database table wp_site and make sure the path is /design/. That or you're overwriting the cookie constants somewhere, which seems unlikely.

  27. DragonFlyEye
    Member
    Posted 15 years ago #

    I pointed this out on Donncha's initial announcement of 2.6Beta1:

    wp-settings.php, starting at line 398:

    /**
    * It is possible to define this in wp-config.php
    * @since 1.5.0
    */
    if ( !defined('SITECOOKIEPATH') )
    define('SITECOOKIEPATH', $current_site->path );

    /**
    * It is possible to define this in wp-config.php
    * @since 2.6
    */
    if ( !defined('ADMIN_COOKIE_PATH') ) {
    if( constant( 'VHOST' ) == 'no' ) {
    define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH );
    } else {
    define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );
    }
    }

    /**
    * It is possible to define this in wp-config.php
    * @since 2.6
    */
    if ( !defined('PLUGINS_COOKIE_PATH') )
    define( 'PLUGINS_COOKIE_PATH', preg_replace('|https?://[^/]+|i', '', WP_PLUGIN_URL) );

    Looks to me like the problem is that the cookie paths are being declared differently and getting different results. Seems like there's something up with $current_site->path because it's those cookies that use that value that don't look right to me.

  28. DragonFlyEye
    Member
    Posted 15 years ago #

    OK, I just did something which in retrospect was quite obvious. I used the Web Developer Toolbar to add a wordpress_ cookie for the path /design/wp-admin.

    Guess what? I'm in. So, I begin to think that my two problems are related.

    I've also found what appears to be the problem with the $WPDB object: not all values are being transferred to the new blog. I've got a little script that will show what I'm talking about, but it's not done yet.

    Still working. . .

  29. DragonFlyEye
    Member
    Posted 15 years ago #

    OK, here's my script:

    http://holisticnetworking.net/testing_wpdb.php

    As you can see, the table names are not changing even though the blog ID is being correctly assigned. I guess I'll have a look at the switch_to_blog() function and see what's wrong.

  30. lunabyte
    Member
    Posted 15 years ago #

    That is strange, especially since $wpdb->prefix is correct.

About this Topic

  • Started 15 years ago by DragonFlyEye
  • Latest reply from Newtidbitz