ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

MSM Front-end login redirect loop

May 16, 2012 1:12am

Subscribe [2]
  • #1 / May 16, 2012 1:12am

    Adam George

    283 posts

    I’m getting in a redirect loop when I try to login in the front-end of either of my MSM sites.

    I can login to the CP fine.

    Site 1 - ww2.site1.org
    Site 2 - site2.org

    When I login to site 1, it redirects in a loop to site 2 on http://www.site2.org.

    When I login to site 2, it redirects in a loop on http://www.site2.org.

    I do get logged-in, but it dumps me on a page with a URL like this:

    http://www.site2.org/?ACT=13&RET=aHR0cDovL3d3dy51c2VmdWxnaWZ0cy5vcmcv&cur=1&orig=0&multi=f09fb4dbe4a3df605afc333ff232a4185a4d8a9f&orig_site_id=2

    http://www.site2.org/?ACT=13&RET=aHR0cDovL3d3Mi50ZWFyLm9yZy5hdS8-&cur=1&orig=0&multi=ffa3b5bb6daae477639a7b00b77fef7d1b50c378&orig_site_id=1

    If I change the ‘orig’ parameter from ‘0’ to ‘1’ I get taken to the right page.
    (related? https://support.ellislab.com/bugs/detail/16620)

    I’m using htaccess to remove index.php - but this has been working fine with logins up till now and I haven’t changed it.

    User login is set to cookies only in both MSM sites.

    I have a cookie prefix set, but no domain set in either MSM site.

    I have this line in config:

    $config['multi_login_sites'] = "http://ww2.site1.org|http://www.site2.org";

    Site 1 index.php:

    $assign_to_config['site_url'] = 'http://ww2.site1.org/';
    $assign_to_config['site_name'] = 'default_site';

    Site 2 index.php:

    $assign_to_config['site_url'] = 'http://www.site2.org/';
    $assign_to_config['site_name'] = 'SITE_SHORT_NAME';

    (SITE_SHORT_NAME is set)

    EE: v2.4.0 - Build: date 20120123
    MSM: 2.1.2 Build: 20120123

    I have tried various settings based on information in the forums, including setting and not setting a cookie domain.

    I have cleared cookies, used different browsers, and tested on a blank template with a basic login form tag.

    I have globally disabled extensions (no effect).

    The only other thing I can think of is emptying the exp_security_hashes table, as advised here and here.

    Please advise, thank you.

  • #2 / May 17, 2012 11:29am

    Dan Decker

    7338 posts

    Hi Adam,

    Sorry for the trouble you are having with MSM.

    I think the issue is related to the values you have in site 1 index.php file.

    When setting up MSM, there are no changes that need to be made to the original index.php and admin.php files. You only edit the MSM specific values in the copies of those files for your additional sites.

    A typical MSM setup should look very similar to this example:

    //CONFIG//
    $config['cp_url'] = "http://engine.dev/admin.php";
    $config['doc_url'] = "http://ellislab.com/expressionengine/user-guide/";
    $config['is_system_on'] = "y";
    $config['allow_extensions'] = "y";
    $config['site_label'] = "Test 23";
    $config['cookie_prefix'] = "";
    $config['multiple_sites_enabled'] = "y";
    
    index.php and admin.php site 1
    NO CHANGES
    
    index.php and admin.php site 2
    $system_path = '../system';
    /*---------------------------*/
    $assign_to_config['site_name']  = 'msm_test';
    $assign_to_config['cp_url'] = 'http://msm.dev/admin.php';
    $assign_to_config['site_url'] = 'http://msm.dev';
    
    --- admin ---
    $system_path = '../system';
    /*---------------------------*/
    $assign_to_config['site_name']  = 'msm_test';
    $assign_to_config['cp_url'] = 'http://msm.dev/admin.php';

    If you comment out the $assign_to_config variables in site 1’s index.php and admin.php files, does the redirect issue resolve itself?

    Cheers,

  • #3 / May 17, 2012 8:11pm

    Adam George

    283 posts

    Hi Dan

    Thanks for your reply.

    If you comment out the $assign_to_config variables in site 1’s index.php and admin.php files, does the redirect issue resolve itself?

    There is no change :-(

  • #4 / May 18, 2012 1:23pm

    Dan Decker

    7338 posts

    Hi Adam,

    We’d like to take a closer look at this. Be on the lookout for an email from me.

    Cheers,

  • #5 / May 22, 2012 4:25pm

    Dan Decker

    7338 posts

    Hi Adam,

    We haven’t heard back from you yet, do you still need our assistance?

    Cheers,

  • #6 / Aug 14, 2012 8:30pm

    Adam George

    283 posts

    Hi Dan

    Yes, I still need assistance. I’ll email you, thank you.

  • #7 / Aug 15, 2012 4:53pm

    Dan Decker

    7338 posts

    Hi Adam!

    Certainly! I’ve resent the request. You should have an email!

    Thanks,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases