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.

Unable to login through the CP

February 09, 2012 11:54am

Subscribe [2]
  • #1 / Feb 09, 2012 11:54am

    noregt

    360 posts

    Hi,

    I’m building a MSM site.

    I can login through the templates files, using the login form, on all sites.

    If I logout in the CP however I can’t login through the default (sytem/login) page.
    Submit returns nothing no error warning either.

    Any idea what’s happening?

    Session are set to cookies. Also tried some settings through the config like:

    $config[‘admin_session_type’] = “c”;
    $config[‘user_session_type’] = “c”;
    $config[‘require_ip_for_login’] = “n”;
    $config[‘require_ip_for_posting’] = “n”;
    $config[‘secure_forms’] = “n”;

    But that doesn’t help.

    EDIT: if I choose ‘Auto log-in on future visits?’, I am able to login.

  • #2 / Feb 10, 2012 2:11pm

    Shane Eckert

    7174 posts

    Hello noregt,

    I am sorry to hear you are running into this problem.

    What version of MSM and ExpressionEngine are you currently running?

    Are MSM and ExpressionEngine both at the latest releases?

    Cheers,

  • #3 / Feb 11, 2012 1:41am

    noregt

    360 posts

    I am using all latest software (it’s a new site). Also, setting login on future visits only works randomly. And sometimes it doesn’t work through the template either. It’s quite annoying. And I’ve got issues with templates and categories too. (see other post)

    http://ellislab.com/forums/viewthread/210628/

  • #4 / Feb 13, 2012 5:28pm

    Dan Decker

    7338 posts

    Hi noregt,

    Just so we are clear, you are using ExpressionEngine 2.4 with MSM 2.1.2.

    Do you have any other add-ons in use on this site?

    There was a bug in 2.3 with the “Remember Me” functionality that we thought we had sorted out for 2.4

    Do you have specific cookie information set for each site in Admin->Security and Privacy->Cookie Settings?

    Are you developing these sites on live domains, a local server, or temporary domains?

    Cheers,

  • #5 / Feb 14, 2012 6:08am

    noregt

    360 posts

    Just so we are clear, you are using ExpressionEngine 2.4 with MSM 2.1.2.

    Yes

    Do you have any other add-ons in use on this site?

    Assets/Wygwam/Freeform/Low reorder/CE image. I haven’t tried disabling removing those yet, because it might screw up things.

    Do you have specific cookie information set for each site in Admin->Security and Privacy->Cookie Settings?

    No specific info, fields are empty. CP and User session are both set to cookie only.

    Are you developing these sites on live domains, a local server, or temporary domains?

    It’s a live domain

     

  • #6 / Feb 15, 2012 3:32pm

    Dan Decker

    7338 posts

    Hi noregt,

    Can you open /system/expressionengine/config/config.php and copy all of your values from:

    $config['app_version'] = '240';
    --- through ---
    // END EE Config items

    Pleas obfuscate any sensitive details regarding your real domain.

    Cheers,

  • #7 / Feb 15, 2012 5:37pm

    noregt

    360 posts

    Thanks Dan, for keeping attention to my question.

    $config['app_version'] = "240";
    $config['install_lock'] = "";
    $config['license_number'] = "";
    $config['debug'] = "1";
    $config['cp_url'] = "http://----system/index.php";
    $config['doc_url'] = "http://ellislab.com/expressionengine/user-guide/";
    $config['is_system_on'] = "y";
    $config['allow_extensions'] = 'y';
    $config['site_label'] = 'blahblah';
    $config['cookie_prefix'] = '';
    
    $config['multiple_sites_enabled'] = "y";
    
    //needed for assets to work in a MSM setting
    $config['assets_site_url'] = '/index.php'; 
    
    //CE image directory
    $config['ce_image_cache_dir'] = '/ce_image_cache/';
    
    // END EE config items

    I’ve tried removing the extra lines from the add ons, but that doesn’t make much of a difference.

  • #8 / Feb 20, 2012 1:22pm

    Dan Decker

    7338 posts

    Hi noregt,

    Let’s make one change here, so that your system matches my test install. For the record, my test MSM install works in all 3 directions, site_1/admin.php, site_2/admin.php and /system/index.php
    Change:

    $config['cp_url'] = "http://----system/index.php";

    To:

    $config['cp_url'] = "http://site_1.tld/admin.php";

    If that returns no joy, we will get you up the ladder to login and get a look first hand.

    Cheers,

  • #9 / Feb 24, 2012 3:18am

    noregt

    360 posts

    Sorry Dan, but what do you mean with “site_1.tld”. Do I have to change that to the complete address of the site?

  • #10 / Feb 24, 2012 7:36pm

    Sean C. Smith

    3818 posts

    noregt,

    Yes you should put in the full address of your site http://domain.com for example.

    If you do that are you then able to successfully login?
    Sean

  • #11 / Feb 25, 2012 4:56am

    noregt

    360 posts

    Right, just tested this and I’m afraid that doesn’t make much of a difference.

    I’ve been trying to find some consistencies. This is what I found:

    If I’m completely logged out, then I can only login through the system panel with ‘auto log-in’ selected. Without that, the form doesn’t return anything.

    If I login through the main site as the user (with admin and CP access) I can’t login without ‘remember me’. With that selected, I can login. If I want to go to the CP I have to login again. With ‘auto login’ selected, I get the error “You are not authorized to perform this action”. When deselected again the form does not respond. Loggin in as super admin works with auto login enabled.

    For the second site, if I login in as the admin for that site (with CP access to that site only), I have to login through the CP form again. This does work, but only with auto login enabled. Going back to the site, I am no longer logged in , although I did enable ‘remember me’. Loggin again does set it right, and then I can go to the CP directly.

    So all in all it’s quite a mess…

  • #12 / Feb 26, 2012 1:45pm

    Dan Decker

    7338 posts

    Hi noregt,

    Right, site_1.tld should have been replaced with the http://yourdomain.com/admin.php

    Now, open each site’s admin.php file and let’s get a look at the $assign_to_config values you have for each one under Multiple Site Manager block.

    We’ll make sure those values are in order.

    If you can get to each site’s Control Panel, under Admin->Security and Privacy->Cookie Settings and make sure all the fields are clear for each site.
    Then in each site for Admin->Security and Privacy->Security and Sessions set the Control Panel to Session ID and the User Session to Cookies Only

    This will give us a clean slate and a reference base to work out exactly what’s happening here.

    Thanks for your patience while we get this sorted out for you!

    Cheers,

  • #13 / Feb 27, 2012 4:52am

    noregt

    360 posts

    Dan, I checked the admin settings for each site including the default site. Do I need to add config settings in the admin file for the default site as well? I did that to check, but it doesn’t improve anything.

    Cookie settings are blank

    I’ve changed CP settings to session id and maintained cooked files for users.

    Also I’ve erased all browser history to be sure there’s a clean slate. I still can’t login without having to select ‘Auto log-in on future visits?’

    EDIT: I’ve tested it with Chrome/ Firefox MAC and with IE 8 Windows

  • #14 / Feb 27, 2012 5:36pm

    Dan Decker

    7338 posts

    Hi noregt,

    Cookie settings are blank

    Excellent, let’s keep them that way for now.

    I’m going to post the values from my fully functioning MSM install. This will give you something to contrast against what you have. Note that some of my values may look a bit odd as the result of running in a local environment.
    My 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.

    Thank you for all you are doing on your end while this gets sorted out. I know it’s frustrating, but I am here to help you get a resolution!

    Cheers,

  • #15 / Mar 29, 2012 7:11am

    noregt

    360 posts

    Hi Dan,

    I FINALLY found the solution after checking your site settings. (got absorbed by other tasks a while)

    In general I had these too, but then I realized that, as a standard, I make a Control panel link in each site footer. these all point to “mysite.com/system” from the root site.

    This works nice with the default site, but of course not with the secondary sites. I changed the CP links to http://www.mysecondsite.com/admin.php and now the users can finally login in a decent manner. The error ‘you are not authorized to perform this action’ makes sense if you’re logging in from site b into site a but don’t have access rights to site a.

    Wish I had realized this earlier, but thanks for all the trouble! 😊

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

ExpressionEngine News!

#eecms, #events, #releases