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.

Logged into CP with MSM: logged into default_site, not logged into second site.

March 03, 2011 4:35am

Subscribe [6]
  • #1 / Mar 03, 2011 4:35am

    Jolle

    38 posts

    I’ve just installed and set up Multiple Site Manager and currently have a default site and a second site defined and running. MSM is enabled, the system is on but both sites are currently set to offline.

    The strange thing is that I do get to see the index template for the default site (as one would expect, me being the Super Admin), but I get served the System Offline Template for the second site, which indicates I’m apparently not logged in to the second site, even though I’m logged in to the CP as Super Admin. Am I missing something here, I thought I could be logged into both…

    EE 2.1.3 (Masked CP) on Enginehosting
    MSM 2.0.0

    -Jolle

  • #2 / Mar 03, 2011 6:13am

    Neil Evans

    1403 posts

    when you log into the control panel, your cookie registers that login and is therefore setup under that domain name. So when you see the second site, the cookie is not for the same domain, hence your not logged in.

    I am no expert on this side of EE, but you might need to look into the cookie configuration, or Security and session settings to see if there is a work around.

    EE support guys will be more specific for you, i wonder if your able to chain cookie domains, allowing for multiple. Or perhaps they will say turn on Session only.

  • #3 / Mar 03, 2011 7:24am

    Jolle

    38 posts

    Thanks! I’ve not been able to get things working that way though…

    I did come across an entry in the Wiki: http://expressionengine.com/wiki/Multiple_Domain_Login/
    But that one applies only to EE1.x

    I still tried adding the following as described in the article
    $conf[‘multi_login_sites’] = “http://www.sitename1.com/index.php|http://www.sitename2.com/index.php”;
    but no luck with that either.

  • #4 / Mar 03, 2011 11:23am

    Sue Crocker

    26054 posts

    Hi, Jolle. You’ll need to use $config instead of $conf - see if that helps. I have it working just fine on a MSM group of sites on MT.

  • #5 / Mar 03, 2011 11:35am

    Jolle

    38 posts

    Hi Sue,
    That makes sense, but still no luck there…

    The domains on EH are set up as follows:
    /public_html/
    /seconddomain_html/
    /thirddomain_html/
    etc.

    So they’re all in separate directories in the root. Not sure if MT’s approach is the same and if that’s where the problem is.

    Isn’t it inherent to MSM that members have a single sign-on to all MSM sites in the installation? It would seem to me that this feature *should* work out of the box.

  • #6 / Mar 03, 2011 5:01pm

    Ingmar

    29245 posts

    Are you using cookies only authentication? Are you setting a cookie domain somewhere in your config?

  • #7 / Mar 03, 2011 5:29pm

    Jolle

    38 posts

    I’m using ‘Cookies only’ for User Session Type, but the other options make no difference. I have no settings specified for cookie domain in either config file nor Cookie Settings in the CP… :(

  • #8 / Mar 04, 2011 9:10am

    Ingmar

    29245 posts

    When you login into the multiple sites separately, using cookies, does that work? Meaning, do you stay logged in to both sites once you’ve actually logged in?

  • #9 / Mar 04, 2011 9:37am

    Jolle

    38 posts

    I currently don’t have any login forms on the front end set up, but I have duplicated the admin.php to the second site and can log in to both CP’s at the same time, at which point I’m also logged in to both sites. I’ve used cookies only for that as you suggested.
    But then, when I log out of one CP, I’m not logged into that site anymore either. EE does not recognize the MSM connection between the two sites outside of the CP.

  • #10 / Mar 04, 2011 4:59pm

    Sue Crocker

    26054 posts

    Hi, Jolle.

    My domains/folders are set to:


    beginners
    luv
    which are in the same directory structure.

    See the enclosed screen shot.

  • #11 / Mar 04, 2011 5:37pm

    Jolle

    38 posts

    Hi Sue, thanks!

    My site folders are one level up: both are in the /www/eh000/ folder. The thing is, EngineHosting states that this is how they always set up secondary domains:

    /www/eh000/public_html/
    /www/eh000/seconddomain_html/
    /www/eh000/thirddomain_html/

    So I’m inclined to stick to that, as EH prefers it that way. There’s nothing in the User Guide for the MSM that suggests any best (or only) practice for setting up secondary domains for use with MSM. Since I’m hosted at EH and following their best practice, I would think everything is set up under optimal conditions for EE and MSM.

    By the way, the info in the Wiki entry I mentioned (http://expressionengine.com/wiki/Multiple_Domain_Login/) is not entirely the same as the info found in the mod.member.php file:

    Multi Site Login

    The login routine can set cookies for multiple domains if needed. This allows users who run separate domains for each channel to have a way to enable users to log-in once and remain logged-in across domains.  In order to use this feature this array index must be added to the config file:

    $conf['multi_login_sites'] = "http://www.siteone.com/|http://www.sitetwo.com";

    Separate each domain with a pipe.

    Here there is no mentioning of “If using MSM, you should include index.php at the end of each domain:” as is stated in the Wiki. Also, both still use “conf” instead of “config”, which as you pointed out is not correct.

  • #12 / Mar 05, 2011 4:25pm

    Greg Salt

    3988 posts

    Hi Jolle,

    When you log into the CP on one site are you switching to the second site in the CP before checking it on the frontend?

    Cheers

    Greg

  • #13 / Mar 06, 2011 6:55pm

    Jolle

    38 posts

    Thanks Greg, but that does not make a difference. Besides, once logged into ‘a’ MSM site, front or back end, shouldn’t one be logged into them all?

    Cheers,
    -Jolle

  • #14 / Mar 07, 2011 4:23am

    John Henry Donovan

    12339 posts

    Jolle,

    Besides, once logged into ‘a’ MSM site, front or back end, shouldn’t one be logged into them all?

    No. Not necessarily.

    Take for example this set-up

    2 sites and Site1 is the primary.
    Then if I log into site1 control panel which is the default then I can edit both sites .
    However I won’t be logged into Site2’s domain on the front-end. I will be logged into Site1’s domain

    Remember that cookies are domain based.Even a variation like having a www in your domain would be considered a different cookie

    The Multiple Domain login solution is for the front-end.

  • #15 / Mar 07, 2011 10:16am

    Jolle

    38 posts

    Hi John,

    Yeah, that’s exactly my setup. It does makes sense, with cookies not going cross-domain. Somehow though I figured logging into MSM would still do that, a bit naive maybe 😊
    Thanks for clearing that up, I guess that closes up this question.

    Cheers,
    -Jolle

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

ExpressionEngine News!

#eecms, #events, #releases