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.

Login as Member not working one one site in the MSM group

November 02, 2008 7:00am

Subscribe [2]
  • #1 / Nov 02, 2008 7:00am

    M Swindler

    30 posts

    I’ve just finished this year’s iteration of a gift swap web site that my family uses for the holiday season.  I wanted to log in as various members (from the control panel) to complete testing of the site, but I cannot seem to do so.

    What I’m using:
    EE 1.6.4 Build 20080626 (didn’t see any bug fixes for this in newer builds or 1.6.5)
    MSM 1.1 Build 20081024

    What I’ve tried / done to diagnose:
    -I made sure my cookie settings are right (each site in the MSM has the correct .domain.com set)
    -I cleared all cookies in Firefox before attempting the login as member
    -I tried logging in as a member to one of my other sites (in the MSM) and it worked
    -I mirrored the security and session preferences from the site that worked to the one that didn’t in the CP (still didn’t work after clearing cookies and trying again)

    I can’t seem to figure this one out.  I’ll resort to trying this and simply navigate from the site that the login as member works on to the one that doesn’t if I have to, but I’d rather not.  Any ideas?

  • #2 / Nov 02, 2008 11:04am

    Robin Sowell

    13255 posts

    What happens when you try to login as one of the non-superadmin?  Everyone but you is non-super- correct?  Does the page just refresh, or…?

  • #3 / Nov 02, 2008 2:38pm

    M Swindler

    30 posts

    Hi Robin,

    Everyone but myself and my wife are non-super.  Just as a test I just tried to log in as her (through the login as member link in the CP) and it didn’t work either.

    The page renders just fine after I attempt the login; problem is, the page has conditionals to see if the user is logged in or not, so I only see the login form I put in for not-logged-in users.

  • #4 / Nov 03, 2008 11:04am

    Robin Sowell

    13255 posts

    Hm- ok, this is frontend.  And if you log out, clear cookies, and login the exact same way as yourself- does it log you in and the conditionals flake out as expected?  (I know it’s a little redundant, but the behavior just sounds odd.)

  • #5 / Nov 03, 2008 11:32am

    M Swindler

    30 posts

    The conditionals only flake out if I use the “Login as Member” link in the Control Panel.  If I log in as myself (or my wife) through the site’s front end, everything works as expected.  Here’s the relevant code, if it helps:

    {if logged_in}
    {embed="site/.header" page_title="Holiday Gift Swap {current_time format="%Y"}"}
    <!--Content that is missing when logging in as member from the CP goes here-->
    {embed="site/.footer"}
    {/if}
    {if logged_out}
    {embed="site/.header" page_title="Login"}
    <h1>Login</h1>
    You must be logged in to access this site.  Please log in below:
    {exp:member:login_form return="swap/index"}
    
    <label>Username</label>
    
    <input type="text" name="username" value="" maxlength="32" class="input" size="25" /></p>
    
    <label>Password</label>
    
    <input type="password" name="password" value="" maxlength="32" class="input" size="25" /><br >
    <span><a href="http://{path=member/forgot_password}">Forgot your password?</a></span>
    
    {if auto_login}
    <input class='checkbox' type='checkbox' name='auto_login' value='1' /> Auto-login on future visits
    {/if}
    
    <input type="submit" name="submit" value="Submit" /></p>
    {/exp:member:login_form}
    {embed="site/.footer"}
    {/if}
  • #6 / Nov 03, 2008 12:18pm

    Robin Sowell

    13255 posts

    Ah, it’s starting to make a bit more sense.  Let’s see- does the control panel you’re on when you ‘login as member’ have the same domain name as the site you’re testing on?  I’m wondering if it’s cookie related- you wouldn’t be getting a ‘multi-login’ effect loging in like that.  I’ll have to dig to see exactly how it’s handling it.

  • #7 / Nov 03, 2008 12:50pm

    M Swindler

    30 posts

    Ah…  My CP is on a different domain.  It’s a different subdomain than my personal site (the one where Login as Member works), but the same domain.  The gift swap is a completely different domain altogether.

    So here’s how I’m set up (abstracted, of course):

    subdomain.workingdomain.com - My CP
    http://www.workingdomain.com - The site where Login as Member works
    http://www.nonworkingdomain.com - The site where Login as Member is broken

    I had the Cookie Domain set to “.workingdomain.com” for the primary site and “.nonworkingdomain.com” for the gift swap site.  Cookie Path is blank on both, and both have a cookie prefix because I bought a commercial license for my future business site that runs on a separate installation on the same server.  Hope all that makes sense.

    I tried switching the Cookie Domain to “.workingdomain.com” for the gift swap site, cleared cookies again, and tried the login as member once more.  Not sure if that should have worked, but it didn’t.

  • #8 / Nov 03, 2008 2:30pm

    Greg Aker

    6022 posts

    Michael:

    You should be running the same build of EE and MSM.  Your EE version/build is behind your MSM build date.  Can you update both to the latest version and build so we can see if that shakes out any bugs?  you need both to be running on build 200081031.

    -greg

  • #9 / Nov 03, 2008 3:27pm

    M Swindler

    30 posts

    OK.  I’ll download and install the latest build and get back to you.

  • #10 / Nov 03, 2008 3:56pm

    Greg Aker

    6022 posts

    Thanks Michael, keep us posted.

    -greg

  • #11 / Nov 03, 2008 4:13pm

    M Swindler

    30 posts

    OK, I’ve upgraded to 1.6.5 build 20081031, and I’m still using MSM 1.1 build 20081024.  No dice.  Same problem.  I tried it with both cookie domains for the gift swap site (clearing cookies each time); neither worked.

  • #12 / Nov 04, 2008 1:00pm

    Robin Sowell

    13255 posts

    I suspect it’s not going to work.  But- let’s just see if this does.  In which case, we’ll know exactly what the issue is.  Can you put an admin.php page in nonworkingdomain.php- you’re masking access and will use nonworkingdomain.com/admin.php as the control panel for that domain.  Either don’t set a cookie domain or set it to .nonworkingdomain .  The prefix, I’m going to ignore right now, as I don’t think it matters.

    I suspect from that cp?  You can login as another user via cp on that domain.  I suspect it boils down to- you can’t set a cookie for one domain on another.  And the cp doesn’t have any ‘mutli-login’ capability.  Having a cp under that domain- a la masking- would work around this.

    Make sense?

  • #13 / Nov 04, 2008 1:55pm

    M Swindler

    30 posts

    Sure does.  I’ll give it a try and get back to you…

  • #14 / Nov 04, 2008 2:02pm

    M Swindler

    30 posts

    Robin,

    Problem solved.  So it must be a cookie setting issue; using the masked access approach worked like a charm.

    Many thanks!

  • #15 / Nov 04, 2008 2:34pm

    Sue Crocker

    26054 posts

    Glad to hear things are working for you again. Please don’t hesitate to post again if needed.

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

ExpressionEngine News!

#eecms, #events, #releases