The MU forums have moved to WordPress.org

WPMU 2.6 wp-login redirects to itself for all blogs except main (46 posts)

  1. keppy
    Member
    Posted 15 years ago #

    Just upgraded to WPMU 2.6. All was appearing to work correctly until I tried to access the backend area for one of the user blogs. Instead of taking me to the wp-admin it redirects me to the login page with this URL:

    http://blogs.joshandmeg.net/ryan/wp-login.php?redirect_to=http%3A%2F%2Fblogs.joshandmeg.net%2Fryan%2Fwp-admin%2F

    After seeing this I asked a user to try to login and they are seeing the same behavior. Feel free to register to see the behavior in action.

    If I manually type the backend url for a blog, such as:

    http://blogs.joshandmeg.net/ryan/wp-admin

    It just takes me to the main blog site admin area. So I effectively cannot get to the backend of the user blogs at all.

    This was not happening pre-2.6 and I've searched and searched through the forums without any resolution.

    Thanks

  2. donncha
    Key Master
    Posted 15 years ago #

    Try deleting the cookies for your domain. Does that help?

  3. keppy
    Member
    Posted 15 years ago #

    Unfortunately deleting cookies doesn't help. Any other ideas?

  4. donncha
    Key Master
    Posted 15 years ago #

    I registered and saw the same thing but I'm not sure what could cause that. Check the wp-config-sample.php - have you got the same define() commands in your wp-config.php? Make sure you use random strings!

  5. keppy
    Member
    Posted 15 years ago #

    I have the normal define('DBstuff') definitions, then I have all the following key definitions, all random strings from api.wordpress.org/secret-key/1.0/ .

    define('AUTH_KEY', 'randomstring');
    define('SECURE_AUTH_KEY', 'randomstring');
    define('SECURE_AUTH_SALT', 'randomstring');
    define('LOGGED_IN_KEY', 'randomstring');
    define('SECRET_KEY', 'randomstring');
    define('SECRET_SALT', 'randomstring');

    define('LOGGED_IN_SALT', 'randstring');

    I also have $base = '/'; and define('VHOST', 'VHOSTSETTING'); , but those have been that way since I first starting using MU at 1.3.

    Still digging.

  6. keppy
    Member
    Posted 15 years ago #

    Well, I rolled the blogs back to MU 1.5.1 so people could login again. So, you can't register to see this behavior anymore.

    I am still wanting to get it resolved though, so is anyone else having this issue or know of any suggested fixes?

  7. keppy
    Member
    Posted 15 years ago #

    Anyone?

  8. Trent
    Member
    Posted 15 years ago #

    On a stock install this wouldn't be a problem. It is possible that you have a plugin that is causing the issue. I would suggest putting up a test install with 1.5.1 and all the plugins you have and then upgrade to 2.6 and troubleshoot as it could be many different issues.

    I am not trying to be smart here about it, but each install is different and I find it good to keep a test install as close as my main install as possible to upgrade as I usually find a plugin along the way that throws me for a loop on upgrade.

    As well, I have base the same, but vhost setting below:

    define('VHOST', 'yes');
    $base = '/';

    Trent

  9. keppy
    Member
    Posted 15 years ago #

    I'll take a look at the VHOST thing, but as for plugins, I'm not using any, so that isn't an issue. I have a test install but my live install is low-scale (just blogs for family members), so I didn't bother testing the upgrade. That'll teach me :)

    Any other ideas?

  10. spiritgod21
    Member
    Posted 15 years ago #

    I'm having the exact same problem. I'll keep digging, but has anyone else found a solution yet?

  11. Lucifix
    Member
    Posted 15 years ago #

    Same problem here... I can't login to any blogs except main one.

    I tried to delete all themes, plugins and mu plugins - nothing did help me.

  12. Anonymous
    Unregistered
    Posted 15 years ago #

    i have a similar problem, but i can login to the admin page, but it prompt me with the following message:
    Warning! WordPress encrypts user cookies, but you must add the following lines to C:\wpmu/wp-config.php for it to work properly.
    Please add the code before the line, /* That's all, stop editing! Happy blogging. */

    define( 'SECRET_KEY', '!6BVy0MutxPjU6CzM9GOEdHZ' );
    define( 'SECRET_SALT', '9ZVFeL3Nz0xr06kznpKVOqCL' );
    define( 'LOGGED_IN_KEY', 'x#rZo2dP0QFpgUtOq9vXrtmm' );
    define( 'LOGGED_IN_SALT', '$SihMnQMZy%0dUKZD^$TCU$t' );
    define( 'AUTH_KEY', 'h@lPC!!%xCatH#UcmG3zXV9u' );
    define( 'SECURE_AUTH_KEY', 'h(qEU&*SNpUA6jL@88We1rLq' );
    define( 'SECURE_AUTH_SALT', 'Zxa%$Sn@vXZGG25QCd57%RZW' );

    after i added these to my wp-config.php file, i can't login anymore.

    i think it has to do with the new security features.

  13. Lucifix
    Member
    Posted 15 years ago #

    Nobody solved this problem yet?

  14. jimgroom
    Member
    Posted 15 years ago #

    Hey,

    For what it is worth, I have the same exact problem for two WPMu sites using subdirectories on a shared host. However, for my installations with dynamic subdomains there was no problem at all with the upgrade to 2.6. I wonder if the subdirectories vs. subdomains may be the culprit here.

  15. jimgroom
    Member
    Posted 15 years ago #

    I found a fix for these issues as they were occurring for me, I'm not sure they will work for everyone, but they worked for my two installs with subdirectories.

    What I did was create a new blank database and deleted the wp-config and .htaccess files. Then loaded WPMu 2.6 as if it were a new install and once I was done, I simply pointed the wp-config file to the pre-exiting database with all my tables and whatnot in it. This worked like a charm for me.

    I'm going to go out on a limb here a say it was the creation of a new .htaccess file and wp-config file for 2.6 that did the magic, but I'm not certain of this, all I know is that it worked.

  16. andrea_r
    Moderator
    Posted 15 years ago #

    So perhaps people aren't updating those files?

    Now that I think of it, any upgrade instructions anywhere don't mention it.

  17. Lucifix
    Member
    Posted 15 years ago #

    Looks like there was a problem in .htaccess file, because it was not updated for MU version 2.6.

    But now I can login to any directory admin menu, but unable to login in main admin :) (I can live with that) :)

  18. sewpafly
    Member
    Posted 15 years ago #

    I'm experiencing the same problem with a brand new 2.6 install. What did the old .htaccess file look like? I found the latest change at trac.mu.wordpress.org, but that doesn't look like it should affect the wp-login stuff.

  19. andrea_r
    Moderator
    Posted 15 years ago #

    Ah, but the config file is different...

    In the download, there's an htaccess.dist as well as a wp-config-sample.php

  20. sewpafly
    Member
    Posted 15 years ago #

    All my files are correct 2.6 files.

    After I try to login, no cookies appear to be set. All I see is a session-id cookie. (I tried setting the ADMIN_COOKIE_PATH to '/', but that didn't have any effect). Any other ideas?

  21. sewpafly
    Member
    Posted 15 years ago #

    Actually, the ADMIN_COOKIE_PATH trick worked. I had initially put it at the end of wp-config.php (after the require), moving it above that line and changing the path to '/wp-admin' worked for me.

  22. keppy
    Member
    Posted 15 years ago #

    Not sure what others were doing, but my .htaccess and wp-config are the correct WPMU 2.6 versions of each. sewpafly, where did you set ADMIN_COOKIE_PATH and were you experiencing the exact same behavior I described in the beginning of the thread?

  23. keppy
    Member
    Posted 15 years ago #

    Correction: sewpafly, how (not where) did you define ADMIN_COOKIE_PATH?

  24. sewpafly
    Member
    Posted 15 years ago #

    This is what I did. Because of other problems, I reinstalled wpmu and now this isn't working for me either...

    // in wp-config.php before the require line
    // at the bottom of the file.
    define('ADMIN_COOKIE_PATH','/wp-admin');

    /* That's all, stop editing! Happy blogging. */

    (that last line is in the default wp-config.php)

  25. sewpafly
    Member
    Posted 15 years ago #

    Latest fix for this had nothing to do with the ADMIN_COOKIE_PATH...

    Background. I installed the default install as blog.example.com, then added another blog at test.example.com. Logging into the first one wasn't a problem, but couldn't log into the second one BECAUSE the cookie for the domain was being set as ".blog.example.com".

    SOLUTION: I went into the database and changed the domain in wp_site from blog.example.com to example.com and everything is working peachy now. I don't know if this will be the same fix for you. YMMV.

  26. andrea_r
    Moderator
    Posted 15 years ago #

    File a trac ticket so it can get fixed. :)

  27. zappoman
    Member
    Posted 15 years ago #

    Not sure that that is a bug...

    If you install the default to blog.example.com, and choose to vhost, then the code will place all blogs at blog1.blog.example.com, blog2.blog.example.com, etc... and so the correct cookie domain is blog.example.com.

  28. keppy
    Member
    Posted 15 years ago #

    sewpafly: If your install was set-up to create new blogs as subdomains, I can see where this would be an issue if the initial WPMU install was defined originally as a subdomain itself (blog.example.com), thus making the cookies incorrect when trying to access test.example.com with a cookie set for blog.example.com.

    However, this is different from my set-up slightly because I did the original install as a subdomain, blogs.joshandmeg.net, then set new blogs to be created as subdirectories (blogs.joshandmeg.net/cindy). So in this case I need the domain in wp-site and the cookie to remain as blogs.joshandmeg.net since that is what the site is defined as.

    Still digging :(

  29. coolgates
    Member
    Posted 15 years ago #

    I'm also experiencing this problem upgrading from 1.5 to 2.6 at http://blogs.journalism.cuny.edu/.

    We're also installed on a subdomain with new blogs as subdirectories, using the settings below:

    define('VHOST', 'VHOSTSETTING');
    $base = '/';

    Keep us posted. I'll also keep digging.

  30. coolgates
    Member
    Posted 15 years ago #

    http://trac.mu.wordpress.org/ticket/670
    It seems like the cause might be something around line 350 in wp-settings.php

    Should we create a new ticket?

About this Topic

  • Started 15 years ago by keppy
  • Latest reply from michael.souris