Magento upgrade theme trouble

by admin
May 15, 2013

Magento + Upgrade == Lots of trouble.
Everyone who ever tried to upgrade their Magento store knows what I am talking about. Lots of (un)expected errors, troubles, headaches.
Such was the case with our upgrade. Recently we had a client who had a shop set on Magento 1.3.2.3 and wanted to upgrade to the latest version (at the time of writing the latest version is 1.7.0.2) because he bought a premium theme that only worked on Magento 1.7.x version.
We did the upgrade and it worked, with no trouble and no errors at all or so we thought 🙂
“Its a miracle” I thought to myself, but our happiness was short lived.
As soon as we installed the new theme it didn’t work as intended, javascript and CSS where broken.
With Firebug I discovered that upon page reload some javascript and other files where missing.
The strange thing is we didn’t knew where he was requesting those files.
After many hours of searching we discovered that he was requesting them from the database but with Magento having 300+ tables the tricky part was finding out from which table.
After many hours of search we found out that the table responsible for this is core_config_data.
I emptied the table and refreshed the page. The theme loaded flawlessly, no more errors, but upon entering the admin area some settings where missing.
So in order to fix this we created a new database called “donor” and redirected our Magento project to it.

<code class="language-xml">
  <connection>
   <host><![CDATA[localhost]]></host>
   <username><![CDATA[root]]></username>
   <password><![CDATA[]]></password>
   <dbname><![CDATA[old]]></dbname>
   <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
   <model><![CDATA[mysql4]]></model>
   <type><![CDATA[pdo_mysql]]></type>
   <pdoType><![CDATA[]]></pdoType>
    <active>1</active>
  </connection></code>
<code class="language-xml">
  <connection>
   <host><![CDATA[localhost]]></host>
   <username><![CDATA[root]]></username>
   <password><![CDATA[]]></password>
   <dbname><![CDATA[donor]]></dbname>
   <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
   <model><![CDATA[mysql4]]></model>
   <type><![CDATA[pdo_mysql]]></type>
   <pdoType><![CDATA[]]></pdoType>
    <active>1</active>
  </connection></code>

Refreshing our homepage started a fresh Magento installation.
We completed the installation and dumped the core_config_data table from the “donor” database, and replaced our “old” core_config_data table with data from the “donor” table.
After we returned our database path to the “old” database and reactivated the theme our problems where solved.
I wrote this article in hope that it will spare you hours upon hours of frustration and suffering.
Good luck with your update 🙂

Comments

0 thoughts on “Magento upgrade theme trouble”

Tell us your opinion:

Your email address will not be published. Required fields are marked *