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.

Problem with multi login with EE 2.3.1 and MSM 2.1

February 09, 2012 3:57am

Subscribe [3]
  • #1 / Feb 09, 2012 3:57am

    W3care

    54 posts

    I am managing two sites like http://www.site1.com and http://www.site2.com via MSM. Site1 is the primary website and site2 is managed via MSM. The both sites are working fine with their login system. I want to preserve member login if logged in from one site, should be logged in other sites also while switching the site.

    I followed the instructions provided here http://expressionengine.com/wiki/Multi_Site_Login but not working.

    I am using EE v2.3.1 with build 20111017 and MSM v 2.1.0. Please let me know if there is more settings required or need to update MSM

  • #2 / Feb 10, 2012 9:31am

    W3care

    54 posts

    Is someone listening to this thread please?

  • #3 / Feb 10, 2012 10:11am

    mark186282

    290 posts

    As you mentioned:

    http://expressionengine.com/wiki/Multi_Site_Login

    is the best documentation on this.

    After logged in to Site A, when you visit Site B are you simply not logged in?

    Any errors? Any other symptoms?

  • #4 / Feb 10, 2012 12:35pm

    Shane Eckert

    7174 posts

    Hello Satya Prakash,

    I would like to know more about the symptoms and if you are seeing any errors, as Mark has mentioned. That would make this a little easier to troubleshoot.

    If you do update MSM, remember to update ExpressionEngine as well.

    I am looking forward to your response.

    Cheers,

  • #5 / Feb 10, 2012 10:06pm

    W3care

    54 posts

    Thank you for looking into this. I do not see any error. 2sites are setup as site.com and site.co.uk. When I login to site.com and switch to site.co.uk it redirects me to site.co.uk’s login page. Though, no errors, etc is showing up. Same happen with .co.uk. When I login at .co.uk and switch to site.com. It puts me on login page without any error.

    Please let me know if I can provide any more info.

  • #6 / Feb 13, 2012 2:16am

    W3care

    54 posts

    I would appreciate your kind attention on this thread please.

  • #7 / Feb 13, 2012 4:38pm

    Shane Eckert

    7174 posts

    Hello Satya Prakash,

    I am sorry to hear you are still running into this snag.

    In each Site’s index.php file (which is located in each Site’s web root), can you please make sure the system path is set correctly? It’s seems like the paths are not quite right from the behavior you describe.

    Also can you double check that Under Admin > Security and Privacy > Security and Sessions, that Control Panel Session Type is set to Cookies and session ID and User Session Type is set to Cookies Only?

    Do you have your ExpressionEngine install setup to use index.php or did you make the changes necessary to remove index.php. That changes the procedure for Multi Site Login as well.

    I am looking forward to your reply.

    Cheers,

  • #8 / Feb 14, 2012 1:59am

    W3care

    54 posts

    Thank you for looking into this.

    I have proper setting into Admin > Security and Privacy > Security and Sessions, that Control Panel Session Type is set to Cookies and session ID and User Session Type is set to Cookies Only. Both sites have system path correctly into root’s index.php.

    I am removing index.php with the instructions provided at http://expressionengine.com/wiki/Remove_index.php_From_URLs

    In config file, I have setting like
    $config[‘multi_login_sites’] = “http://www.site_name.com/|http://www. site_name.co.uk/”;

    The both sites are hosted at same server with the structure
     Root
    o site_name.co.uk
    o httpdocs
     EE files and folders are residing here, this is primary website

    Please let me know if this is causing issue due to sites directory configuration at server.

  • #9 / Feb 15, 2012 3:21pm

    Shane Eckert

    7174 posts

    Hello Satya Prakash,

    I talked with a fellow Customer Advocate about this thread. He found something interesting.

    The symptoms you are seeing sound very similar to this bug. The fix is found in ExpressionEngine version 2.4. We believe that to solve this issue you will need to update ExpressionEngine to version 2.4. With MSM, you must update both MSM and ExpressionEngine to their most current versions.

    The current version of MSM is 2.1.2 and the current version of ExpressionEngine is 2.4.

    Are you able to update at this time?

    Let me know what you think.

    Cheers,

     

  • #10 / Feb 21, 2012 5:35am

    W3care

    54 posts

    I have upgraded my EE to 2.4.0 build 20120123 and MSM version is 2.1.2. Though, I cannot see any change. It’s same as earlier. Could you please look into this ASAP and advise accordingly.

    I really appreciate your early response.

  • #11 / Feb 21, 2012 8:55am

    W3care

    54 posts

    I upgraded the EE with latest version 2.4 (Build: date 20120123) and MSM v 2.1.2. But now getting a new problem. When I login to my main site (http://www.site_name.com), it gets redirected to second website (http://www.site_name.co.uk) with query string like
    http://www.site_name.co.uk/?ACT=15&RET=aHR0cDovL3d3dy5jaGFib29saS5jb20v&cur=1&orig=0&multi=85d66b79859c07d48f6a0304fa541d37723da799&orig_site_id=1 and browser hangs up with the message “The page isn’t redirecting properly”.
    After that, while I access both sites individually, the member is showing as logged in at both sites.

    But, I don’t want redirection to next site because there is feature to switch between sites with preserving member login from any site.

    In config file, I have setting:
    $config[‘allow_multi_logins’] = “y”;

    If I remove it or set it as ‘n’, redirection doesn’t happen but user doesn’t get login to second site.

    Please let me know, what I am missing OR do I need to put some hack into mod.member_auth.php file into the function _redirect_next_site.

    Any help will be greatly appreciated.

  • #12 / Feb 23, 2012 11:19am

    W3care

    54 posts

    Has anybody got a chance to look into. My website is almost ready to go live and just waiting for this final stuff.

  • #13 / Feb 24, 2012 12:32pm

    Shane Eckert

    7174 posts

    Hello Satya Prakash,

    The directions on the Wiki should be all you need to do.

    Can you double check that you settings reflect the wiki steps? It sounds like one of the sites has a wrong parameter set. Each site’s index.php should have the similar to below. Making especially sure the paths are correct.

    $assign_to_config['site_name']  = 'default_site';
    $assign_to_config['cp_url'] = 'http://example.com/admin.php';
    $assign_to_config['site_url'] = 'http://example.com';

    I am sorry this is still an issue for you, I am hoping we can get to the bottom of this soon.

    If you want we can compare the contents of each of the steps from the wiki together. Just paste them here and mask your domains.

    Looking forward to your response.

    Cheers,

  • #14 / Feb 27, 2012 8:51am

    W3care

    54 posts

    Hi Shane Eckert,

    Thanks for your response.

    I don’t think, this is happening due to the setting into index.php files at both website. Because if there was anything wrong, the both websites don’t run properly. Both websites are running good without any issue related to path or “SITE URL” or “CP URL”. I re-checked all these setting and seems fine to me.
    And also, from EE’s Control Panel, I can switch the websites properly and can login to the CP of websites individually.

    I inspected the member authentication file mod.member_auth.php (located in directory “system/expressionengine/modules/member/”), there is a method _redirect_next_site() which performs unusual redirection to next website which I have mentioned in my previous post.
    The website user should be redirected to same website after login and can switch the between websites preserving the login.

    I ‘ll be very grateful for your further suggestions.

  • #15 / Feb 27, 2012 5:55pm

    Shane Eckert

    7174 posts

    Hello,

    I think we should take a step back and make sure your baseline install of MSM is correct.

    See the examples below and compare with your install to make sure.

    config.php:

    $config['app_version'] = "231";
    $config['install_lock'] = "";
    $config['license_number'] = "";
    $config['debug'] = "1";
    $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";

    Site 1 index.php MSM variables - note they are commented out *and should be*

    /*
     * --------------------------------------------------------------------
     *  Multiple Site Manager
     * --------------------------------------------------------------------
     *
     * Uncomment the following variables if you are using the Multiple
     * Site Manager: <a href="http://ellislab.com/expressionengine/user-guide/cp/sites">http://ellislab.com/expressionengine/user-guide/cp/sites</a>
     *
     * Set the Short Name of the site this file will display, the URL of
     * this site's admin.php file, and the main URL of the site (without
     * index.php) 
     *
     */
    // $assign_to_config['site_name']  = 'domain2_short_name';
    // $assign_to_config['cp_url'] = 'http://domain2.com/admin.php';
    // $assign_to_config['site_url'] = 'http://domain2.com';

    Site 1 admin.php MSM variables - note they are commented out *and should be*

    /*
     * --------------------------------------------------------------------
     *  Multiple Site Manager
     * --------------------------------------------------------------------
     *
     * Uncomment the following variables if you are using the Multiple
     * Site Manager: <a href="http://ellislab.com/expressionengine/user-guide/cp/sites">http://ellislab.com/expressionengine/user-guide/cp/sites</a>
     *
     * The variables set the Short Name of the site this admin.php file
     * will log into, and its URL.
     *
     */
    // $assign_to_config['site_name']  = 'domain2_short_name';
    // $assign_to_config['cp_url'] = 'http://domain2.com/admin.php';

    Site 2 index.php MSM variables:

    /*
     * --------------------------------------------------------------------
     *  Multiple Site Manager
     * --------------------------------------------------------------------
     *
     * Uncomment the following variables if you are using the Multiple
     * Site Manager: <a href="http://ellislab.com/expressionengine/user-guide/cp/sites">http://ellislab.com/expressionengine/user-guide/cp/sites</a>
     *
     * Set the Short Name of the site this file will display, the URL of
     * this site's admin.php file, and the main URL of the site (without
     * index.php) 
     *
     */
     $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';

    Site 2 admin.php MSM variables:

    /*
     * --------------------------------------------------------------------
     *  Multiple Site Manager
     * --------------------------------------------------------------------
     *
     * Uncomment the following variables if you are using the Multiple
     * Site Manager: <a href="http://ellislab.com/expressionengine/user-guide/cp/sites">http://ellislab.com/expressionengine/user-guide/cp/sites</a>
     *
     * The variables set the Short Name of the site this admin.php file
     * will log into, and its URL.
     *
     */
     $assign_to_config['site_name']  = 'msm_test';
     $assign_to_config['cp_url'] = 'http://msm.dev/admin.php';

    Each of your respective files should be set up similarly to these examples.

    Also “Under Admin > Security and Privacy > Security and Sessions ensure that Control Panel Session Type is set to Cookies and session ID and User Session Type is set to Cookies Only.

    Leave all setting fields blank under Admin > Security and Privacy > Cookie Settings so they can be automatically set by EE.”

    Let me know if this makes sense and if the your base install matches.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases