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.

Site Error: Unable to Load Site Preferences; Invalid Preference Data

February 18, 2011 10:09pm

Subscribe [5]
  • #1 / Feb 18, 2011 10:09pm

    tunnel7

    125 posts

    Hello.  I have just upgraded from 1.6.7 to 2.1.3 and now am getting the following error for both the site homepage and the admin:

    Site Error: Unable to Load Site Preferences; Invalid Preference Data

    I’ve done some quick checks on the forums just now but I don’t see a solution to the problem.  Is there a fix for this that I can try.  I’m going back to see what I can figure out.

  • #2 / Feb 18, 2011 10:32pm

    tunnel7

    125 posts

    For what it’s worth ... this error is being loaded from the file system/expressionengine/core/EE_Config.php ... message loaded at line 192 and 216

    Line 192

    if ($query->num_rows() == 0)
            {
                if ($site_name == '' && $site_id != 1)
                {
                    $this->site_prefs('', 1);
                    return;
                }
                else
                {
                    exit("Site Error:  Unable to Load Site Preferences; No Preferences Found");
                }
            }

    and around line 216

    if (substr($name, -12) == '_preferences')
                {
                    $data = base64_decode($data);
    
                    if ( ! is_string($data) OR substr($data, 0, 2) != 'a:')
                    {
                        exit("Site Error:  Unable to Load Site Preferences; Invalid Preference Data");
                    }            
                    // Any values in config.php take precedence over those in the database, so it goes second in array_merge()
                    $this->config = array_merge(unserialize($data), $this->config);
                }
  • #3 / Feb 18, 2011 11:01pm

    Enviromed

    375 posts

    Hi:  Not a specific answer, but we upgraded from 1.6.9 and had some serious problems which resolved entirely after 1.7 was released.  Upgrading from 1.7 to 2.1.3 is worth a try.  Chris

  • #4 / Feb 20, 2011 3:29pm

    Greg Salt

    3988 posts

    Hi tunnel7,

    Please revert to your full backup and, as Enviromed suggests, try upgrading your site to version 1.7.0 first. If that worked correctly then create another backup and try the 2.x upgrade again.

    Cheers

    Greg

  • #5 / Feb 22, 2011 9:48am

    tunnel7

    125 posts

    Thanks for the direction, Greg.  I’m working on this now and will let you know how it goes.

  • #6 / Feb 22, 2011 3:33pm

    danakm

    75 posts

    Hi

    I am having the same problem. I have done the full upgrade to 1.7 then proceeded to 2.13 with the same error result as you. Have you been able to resolve this? If so can you let me know what you did?

    Thanks
    Dana

  • #7 / Feb 22, 2011 3:38pm

    tunnel7

    125 posts

    Greg,

    Yep, that did the trick.  I did end up running into a log of db errors in the update files because some of the new tables were already in there but I was able to work through that.  Site is up and running now.  One suggestion ... on the instructions from going to 1.x to 2.x it might be useful to explicity state that you need to upgrade to current 1.x branch before going to 2.x.  I was under the impression that it would make those updates in the process.

    Dana ... rolling back to the backup of the DB and then moving forward with the upgrade did work for me. 

    derek

  • #8 / Feb 22, 2011 4:02pm

    Ingmar

    29245 posts

    Thanks, Derek. Where are you with this, Dana?

  • #9 / Feb 22, 2011 4:17pm

    danakm

    75 posts

    I just tried again. Re-inmported my database, then tried the 2.13 install again: deleted the files and directories ftp’d them over following the instructions.

    Now the installer allows me to start but after the the screen with the question about comments and trackbacks - which I awnsered no to all since they were not being used - I click the button and then get

    A Database Error Occurred
    Error Number: 1050

    Table ‘exp_snippets’ already exists

    CREATE TABLE `exp_snippets` ( `snippet_id` int(10) unsigned NOT NULL auto_increment, `site_id` int(4) NOT NULL, `snippet_name` varchar(75) NOT NULL, `snippet_contents` text NULL, PRIMARY KEY (`snippet_id`), KEY `site_id` (`site_id`) )

    Filename: updates/ud_200.php

    Line Number: 1382

  • #10 / Feb 22, 2011 4:18pm

    danakm

    75 posts

    Should I delete the database completely or empty the tables (which is what I did)?

  • #11 / Feb 22, 2011 4:39pm

    tunnel7

    125 posts

    Dana, I ran into this as well.  What I believe is happening is that you’re database has all the new tables in it.  When I ran into this i opened up the update file referenced here and started commenting out the offending lines ... it was tedious but eventually it did work.

  • #12 / Feb 22, 2011 4:39pm

    danakm

    75 posts

    OK so I tried that too - had to rename the database and then make that change in the config file.

    Now when I run the installer it allows me to go through the update until the little pop up window says that it encountered but did not record an error.

    The browser says there are errors on the page:

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; .NET4.0C)
    Timestamp: Tue, 22 Feb 2011 20:34:05 UTC


    Message: ‘console’ is undefined
    Line: 239
    Char: 6
    Code: 0
    URI: http://oceancitylsmuseum.fatcow.com/ee/system/index.php?C=wizard&M=do_update&agree=yes&language=english&ajax_progress=yes

    This is starting to really aggravate me. I tried running the installer a second time but then I get same error as in post #8 above.

  • #13 / Feb 22, 2011 4:47pm

    danakm

    75 posts

    Coding is not my strong suit. I am actually a designer. I know - cry me a river - 😊

    I know I am being a bit of a baby about this.

    But I bought a product that is supposed to upgrade from the previous version without me having to dig into the code at the risk of messing things up.

    Ingmar - Sue - somebody help please!!!

  • #14 / Feb 23, 2011 6:56am

    John Henry Donovan

    12339 posts

    danakm,

    Ok revert back to 1.7.
    Check that the snippets table does not exist in your database.
    Repair and optimize the database.

    If not using the Wiki module uninstall it. Install the comments module even if you are not using it.

    Do you have any third party extensions?

    In your config file what s the app version at?

  • #15 / Feb 23, 2011 12:25pm

    danakm

    75 posts

    Hi John

    I have two coversations going on about this - I am going to switch to this thread:

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

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

ExpressionEngine News!

#eecms, #events, #releases