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 Upgrading an MSM site from 1.7 to 2.1.3

February 21, 2011 12:52pm

Subscribe [2]
  • #1 / Feb 21, 2011 12:52pm

    Jérôme Coupé

    122 posts

    Version: 2.1.3
    Build: 20101220
    MSM Version: 2.1.0
    MSM Build: 20101220

    We are upgrading our first MSM site (sub directories) to EE2 and we run into the following problem:

    We update from 1.7 to 2.1.3 without problem
    When we try to enable MSM, we get the following error and are unable to enter the CP:

    Site Error: Unable to Load Site Preferences; No Preferences Found

    Done so far:

    * checked the forums for relevant threads
    * checked the exp_sites table and checked that the paths specified in our index.php files in each of our sub directories match the site_name in the exp_sites table
    * used a base64 deserializer and checked the table data. They look ok (apart from the fact that we had to turn off password_lockout for the master site because we were getting an error message preventing us from logging in even with MSM disabled).
    * checked the config.php file. The error disappears when manually disabling MSM using

    $config['multiple_sites_enabled'] = 'n';

    We would obviously like MSM to work on this one ;o) How can we try to debug this (we have tried setting the debug parameter to 1 and 2 ... still exactly the same message.

    Currently this is on a local dev server but we can put it online if you guys / gals need CP access.

  • #2 / Feb 22, 2011 3:27am

    John Henry Donovan

    12339 posts

    jeromecoupe,

    Have you updated the index files in the MSM directories with the new ones.

    Are you masking the control panel?

    Make sure all your MSM files have been replaced in your update

  • #3 / Feb 22, 2011 4:53am

    Jérôme Coupé

    122 posts

    Hi John Henry,

    Thanks for stopping by.

    1. Yep index.php files were updated. There is one in a folder called “/nl” in the root of the site (MSM used for multiple languages). Here is the code inside that one. Compared to the old path.php file, only 3 values are specified (site_name, cp_url, site_url). I have checked that the value vor site_name matches the value stored in the DB in the site_name column. Do I have to use the array above, rather than the 3 uncommented lines ?

    /*
     * --------------------------------------------------------------------
     *  CUSTOM CONFIG VALUES
     * --------------------------------------------------------------------
     *
     * The $assign_to_config array below will be passed dynamically to the
     * config class. This allows you to set custom config items or override
     * any default config values found in the config.php file.  This can
     * be handy as it permits you to share one application between more then
     * one front controller file, with each file containing different 
     * config values.
     *
     * Un-comment the $assign_to_config array below to use this feature
     *
     * NOTE: This feature can be used to run multiple EE "sites" using
     * the old style method.  Instead of individual variables you'll
     * set array indexes corresponding to them.
     *
     */
    //    $assign_to_config['template_group'] = '';
    //    $assign_to_config['template'] = '';
    //    $assign_to_config['site_index'] = '';
    //    $assign_to_config['site_404'] = '';
    //    $assign_to_config['global_vars'] = array(); // This array must be associative
    
    /**
     * If you are running the Multiple Site Manager, uncomment and assign the following variables 
     * See <a href="http://ellislab.com/expressionengine/user-guide/cp/sites/domainsetup.html">http://ellislab.com/expressionengine/user-guide/cp/sites/domainsetup.html</a>
     */
    $assign_to_config['site_name'] = 'educapoles_nl';
    $assign_to_config['cp_url'] = '../mysystem/';
    $assign_to_config['site_url'] = 'http://ee2.educapoles.local/nl';

    2. Nope, no masked CP

    3. I just replaced the MSM files again. No dice.

    This one is driving me nuts. Is there any way to have a more detailed error message to see where it fails exactly?

    One thing I noticed is that, in the exp_sites table, there is only a value for the site_bootstrap_checksum for the site with an ID of 1 (the first we created back when on 1.7). No value for both the other sites. Could this be causing the problem ?

  • #4 / Feb 22, 2011 5:22am

    Jérôme Coupé

    122 posts

    Hello There,

    Reporting on my progress so far:

    Discovered that I had the following value in the config.php

    $config['site_name'] = 'EducaPoles DEV';

    That value was different than the one in the exp_sites table. When I changed it to the right one > “educapoles_en” the error disappeared.

    I thought that the values specified in the various index.php files in the MSM section were supposed to override any value specified in the config.php. Isn’t that the case? What happened here is that that particular value in config.php was not overridden by the one I specified in the index.php for that site ... as soon as I changed that value in config.php or commented it out, it worked. Strange.

    Another question for the multilingual websites champion at EllisLab: can you use the index.php files to specify a different template basepath for each website or can you only do this via the CP?

    EDIT: forget that. EE2 is creating a subfolder per site. No need for such an option then, I can just reference the path to the template folder (same for all three websites).

    I guess you can close this one (but I would still like to know why overriding config.php values with index.php values does not seem to work).

  • #5 / Feb 22, 2011 4:37pm

    Ingmar

    29245 posts

    I am glad to see you’re all set. And no, you probably shouldn’t have conflicting values in index.php and config.php. Best to keep them all in the config file, I think. Please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases