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.

issue with cookies and logging into the control panel

July 12, 2012 12:07pm

Subscribe [8]
  • #1 / Jul 12, 2012 12:07pm

    Stephen T

    127 posts

    I’m running EE 2.5.2 and Multiple Site Manager 2.1.3 Build 20120529.

    I’m in the process of setting up 3 sites using Multiple Site Manager and have been having an issue many times a day where I can’t log in to the site through the Control Panel.  I enter my username and password and the log in screen just refreshes, but doesn’t let me in.  If I clear all the cookies from my browser, then I’m able to log in fine.  This happens in Firefox, Safari, and Chrome.  The same thing happens if I try to log in through the front end using the member log in page.

    I was thinking the issue might be something to do with running multiple sites, but haven’t been able to figure out a pattern.  I’m only letting people log in to the control panel through the default site, but they can log in to the front end from the other sites as well.  The sites all share the same root domain - so site 1 is http://www.domain.com, site 2 is http://www.domain.com/site2, and site 3 is http://www.domain.com/site3.  I have the Control Panel Session Type set to “Cookies and session ID” and the User Session Type set to “Cookies only”.  The Cookie Domain is set to http://www.domain.com for all 3 sites and the Cookie Path and Cookie Prefix are both left blank.

    Any idea what’s going on or how I can troubleshoot this better?

    Thanks for your help!

  • #2 / Jul 16, 2012 12:35pm

    Dan Decker

    7338 posts

    Hi Stephen T,

    Ahhhh… MSM and cookies… good times.

    The best approach to troubleshooting MSM/cookie/login issues is to reduce where you can. For each site, let’s clear the cookie domain values. Just let those be blank too.

    Then, let’s open each site’s admin.php and set the main Control Panel URL as the value for $assign_to_config[‘cp_url’]

    --- admin ---
    $system_path = '../system';
    /*---------------------------*/
    $assign_to_config['site_name']  = 'msm_site';
    $assign_to_config['cp_url'] = 'http://www.primarydomain.com/admin.php';

    Let me know your results!

    Cheers,

  • #3 / Jul 19, 2012 4:56pm

    Stephen T

    127 posts

    Hi Dan,

    I just made these changes and managed to recreate the same error.  Since I was only allowing access to the CP from one site, I didn’t have admin.php files for each of the other two sites, but I created them and added the parameter you suggested. 

    Below are the steps that I took to get the error.  Keep in mind that I’m only allowing access to the CP from one URL, which is the CP for the default site (site 1)

    1) Log into site 1 CP.
    2) Switch sites in the CP to site 2 or 3
    3) Log out of the CP. This takes me back to the login screen for the default site CP.
    4) Try to log in again.  Nothing happens, the login page just refreshes.

    I tried to see what would happen if I allowed access to the CP from all 3 sites, and I got the same result no matter what CP URL I used.  Do you think the issue is something to do with the fact that all 3 sites share the same root domain?  Any other cookie settings you think I could try?

     

  • #4 / Jul 20, 2012 3:36pm

    Shane Eckert

    7174 posts

    Hey Stephen T,

    MSM should be okay with the one domain.

    Can you set those values back for each domain and try that with the addition you made to the config file?

    Thank you,

  • #5 / Sep 10, 2012 4:12pm

    Stephen T

    127 posts

    Hi Shane,

    I obviously let this fall by the wayside, but I’m back to looking into this problem.  I’ve set the values for the assign_to_config[‘cp_url’] back to their original values, but didn’t have any luck.  Right now I have 4 sites - two that share the same CP URL, and two that each have separate CP URL’s.  I’ve also noticed that if I take the same steps above, but add a 5th step where I log into the CP of site 2, I can get into the CP.  But I still can’t get in to the CP of site 1.  So:

    1) Log into site 1 CP.
    2) Switch sites in the CP to site 2, which has a different cp_url value from site 1.
    3) Log out of the CP. This takes me back to the login screen for the site 1 CP.
    4) Try to log into site 1 again.  Nothing happens, the login page just refreshes.
    5) Type in the URL of the CP login screen for site 2 and it lets me log into that site fine, but it won’t let me log back into the site 1 CP until I clear my browsers cookies.

    Any other ideas?

  • #6 / Sep 11, 2012 12:24pm

    Dan Decker

    7338 posts

    Hey Stephen,

    I sent along a request for more details!

    I’d like to get a first hand look at this.

    Cheers,

  • #7 / Sep 11, 2012 12:35pm

    Stephen T

    127 posts

    Sounds good.  I’ll send the details.

  • #8 / Sep 12, 2012 10:04am

    Dan Decker

    7338 posts

    All -

    We’ll be working with Stephen behind the curtain and will report back we have a solution.

    Thanks!

  • #9 / Sep 12, 2012 10:33am

    We’re also experiencing a similar issue.  We can log in to the CP but cannot switch to another MSM site from the pull down menu.  Doing so refreshes the current site, but upon logging out/in the selected site comes up.  Any ideas?

    EE 2.5.2 MSM 2.1.3

  • #10 / Sep 12, 2012 1:38pm

    Update: After making the suggested changes in the config.php file, we are now having the exact same issue as Stephen.

  • #11 / Sep 12, 2012 2:35pm

    Shane Eckert

    7174 posts

    Hey Trapeze Software Inc.,

    We will update this thread with the results from Steven’s case. Stay tuned!!

    Cheers,

  • #12 / Sep 17, 2012 10:39am

    Any updates with this??

  • #13 / Sep 18, 2012 4:43pm

    Shane Eckert

    7174 posts

    Hello Trapeze,

    Can you tell me a bit about your situation. The case with Stephen revealed that this was actually intended behavior.

    Thank you,

  • #14 / Sep 20, 2012 3:19pm

    dallasthiele

    6 posts

    I’m having a similar problem to the first person here. One main site, one subdomain site using MSM. If a user has logged in and logged out the next attempt to login will keep infinitely bring them back to the login screen with no errors being reported. Waiting an hour or clearing cookies fixes the issue.

    Haven’t attempted the fix listed since I do have admin.php on the MSM site. Should I try this or something else?

    Running EE 2.5.3 & MSM 2.1.4.

  • #15 / Sep 20, 2012 3:31pm

    Stephen T

    127 posts

    Hi Shane and all,

    Actually, I would disagree that my case revealed that this was intended behavior.  EE Support did make a change to my site that fixed the issue where users couldn’t log into the control panel at all after switching sites.  After that change was made, I noticed that the “current site” you were on in the CP wasn’t cleared when a user logged out and that was actually the intended behavior, but not the original problem where a user couldn’t log into the control panel at all.  Just wanted to make sure that was clear.

    The support team and engineers were still working on a solid solution that could be applied to all sites instead of just my case.  I have found a few issues after the fix that seem to be causing other log in problems on the front end so I’m continuing to work with the EllisLab Team to figure those out.

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

ExpressionEngine News!

#eecms, #events, #releases