Hey all,
I’ve got an update after working with Visualis privately. In almost every case where I see the error message “Site Error: Unable to Load Site Preferences; Invalid Preference Data”, it’s caused by corrupted site preferences in the database. Dan alluded to this previously, but I’m going to go into more detail here to help you fix this yourselves.
Disclaimer: You’ll be working directly against your database to fix this. Please make sure you have a reliable backup of your database before proceeding.
It’s my assumption that everyone here experienced this after upgrading from EE 1.x to EE 2.x.
To perform this fix, you’ll need access to your database pre-upgrade (EE 1.x), access to your database post-upgrade (EE 2.x), and some kind of visual DB tool like PHPMyAdmin or Sequel Pro. If you’ve taken a backup of your database before upgrading, as the upgrade instructions strongly recommend, then you can just restore that backup to a new blank database that you’re not using for your site. It helps to have both the pre-upgrade and post-upgrade databases right next to each other, as it were, so that you can quickly switch between the two. You’ll be copying some data from the pre-upgrade DB to the post-upgrade DB.
1. In your EE 1.x database, navigate to the exp_sites table and find the column site_system_preferences. Copy the data from this column.
2. Use the utility at Online PHP Unserializer to unserialize the data. Copy it into the field, do not check the box labeled base64 decode, and click “Unserialize!”
3. Now on the resulting page, scroll down to the bottom, this time do check the box labeled base64 encode, and click “Re-serialize!”
4. Copy the contents of the box titled “Re-serialized output”.
5. Now open up your EE 2.x database, and navigate to the exp_sites table to find the site_system_preferences field. Paste and save here the data you copied from the box in the previous step. (If you’re running an MSM site with multiple rows in your exp_sites table, you’ll repeat steps 1-5 for each one.)
6. Now log in to your CP and double-check all your settings and preferences, especially things like site URL and forum theme path, etc.
That should take care of it. If you’ve followed the steps above carefully and you’re still not finding any resolution, let us know!