Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Upgrade 1.5 to 1.6 deletes DB tables and leaves webshop dead
 
Solide
Member
 
Avatar
Total Posts:  44
Joined:  2010-03-13
Netherlands
 

I’m trying to upgrade a Magento 1.5 webstore to Magento 1.6.1.0 and I have tried using FTP, Magento Connect and SSH but all methods have not worked thus far. All methods fail when updating the database after the first page visit. It takes some time and then I get a “There has been a error processing your request” styled error screen. Right before the this error screen this screen flashes the error as attached to this topic. As you can see in this error a complete database table is missing because of the upgrade. Why is the upgrade process deleting this table and what can I do to fix this.

I have tried this on fast webhosting as wel as on a localhost but I end up with the same error over and over. The problem does not seem to be caused by the lack of resources during the database upgrade.

I have tried the database repair tool. Comparing the 1.5 database with a reference 1.5 database doesnt show any errors. Trying the fix the corrupted 1.6 upgraded database with a reference 1.6 database doesnt help me either.

Image Attachments
error.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
Solide
Member
 
Avatar
Total Posts:  44
Joined:  2010-03-13
Netherlands
 

After months of leaving this alone and accepting I’m stuck on 1.5 I just tried another test upgrade but with the same results. It would be great if someone could help me out here. Why is the upgrade process deleting entire tables?

 
Magento Community Magento Community
Magento Community
Magento Community
 
NuBlue
Sr. Member
 
Avatar
Total Posts:  94
Joined:  2008-03-31
Lancaster, United Kingdom
 

Hi Phuture,

We get a lot of issues back from clients attempting the upgrade process and there do appear to a great deal of different ways to go about it. So far we\’ve found that our clients tend to have the most success using the following method:

Create yourself a complete fresh brand spanking new installation of Magento 1.6 with a new database and no sample data. Once its up and running start porting over your skin files and media folder so your content and theme is all ready to go. Once that\’s all done create a copy of your live database from your 1.5 magento store and put this into a completely empty new database.

Once you\’ve done the above, go to the file structure for the 1.6 installation and delete app/etc/local.xml (just the file not the folders!) then browse back to the front page of the 1.6 installation. It should kick start the install process again, however this time point the database to your copy of the 1.5 database, make sure not to do this for the live database as it\’s possible it could go wrong! If in doubt take a backup first. Now finish the installation process.

Once its done browse to the frontend, the installation should now be running an upgrade process on the mysql database to upgrade structure, this can take time some depending on the size of the database, and while its running expect to see errors on the frontend. If you have the ability to see the mysql process list then this gives you a good idea of what stage the upgrade is at. Once the database upgrade is complete you have one of two things:

1) Working upgraded version of Magento!

2) A broken store with a lot of errors in /var/reports

If you end up on 2, then at least you have some indicators as to what might be incompatible for the upgrade process and since it was all done in a development area you can wipe it out and try again!

I hope the above helps, its a simple process once you do it a couple of times and it seems to work very well for a number of clients.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Solide
Member
 
Avatar
Total Posts:  44
Joined:  2010-03-13
Netherlands
 

Thanx for suggesting another method to try out. I followed your step but I already run into errors during the installation proces of a Magento 1.6.2.0 on my 1.5.0.1 database and after several refreshes it ends up with the same error as posted in the first post.. Here are the errors from /var/report/

FIRST ERROR

a:5:{i:0;s:248:"Error in file: "..\app\code\core\Mage\Customer\sql\customer_setup\mysql4-upgrade-1.5.9.9-1.6.0.0.php" - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-354' for key 'UNQ_BY_CUSTOMER'";i:1;s:1128:"#0 ..\app\code\core\Mage\Core\Model\Resource\Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 ..\app\code\core\Mage\Core\Model\Resource\Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.4.0.0.14', '1.6.1.0')
#2 ..\app\code\core\Mage\Core\Model\Resource\Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.4.0.0.14', '1.6.1.0')
#3 ..\app\code\core\Mage\Core\Model\Resource\Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 ..\app\code\core\Mage\Core\Model\App.php(412): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 ..\app\code\core\Mage\Core\Model\App.php(338): Mage_Core_Model_App->_initModules()
#6 ..\app\Mage.php(640): Mage_Core_Model_App->run(Array)
#7 ..\index.php(80): Mage::run('', 'store')
#8 {main}"
;s:3:"url";s:36:"/index.php/install/wizard/installDb/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

SECOND ERROR

a:5:{i:0;s:279:"Error in file: "..\app\code\core\Mage\Catalog\sql\catalog_setup\mysql4-upgrade-1.5.9.9-1.6.0.0.php" - SQLSTATE[HY000]: General error: 1025 Error on rename of '.\shn162\#sql-bdc_92' to '.\shn162\catalog_category_product_index' (errno: 150)";i:1;s:1132:"#0 ..\app\code\core\Mage\Core\Model\Resource\Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 ..\app\code\core\Mage\Core\Model\Resource\Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.4.0.0.44', '1.6.0.0.8')
#2 ..\app\code\core\Mage\Core\Model\Resource\Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.4.0.0.44', '1.6.0.0.8')
#3 ..\app\code\core\Mage\Core\Model\Resource\Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 ..\app\code\core\Mage\Core\Model\App.php(412): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 ..\app\code\core\Mage\Core\Model\App.php(338): Mage_Core_Model_App->_initModules()
#6 ..\app\Mage.php(640): Mage_Core_Model_App->run(Array)
#7 ..\index.php(80): Mage::run('', 'store')
#8 {main}"
;s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

THIRD AND FINAL AND SAME AS BEFORE ERROR

a:5:{i:0;s:254:"Error in file: "..\app\code\core\Mage\Catalog\sql\catalog_setup\mysql4-upgrade-1.5.9.9-1.6.0.0.php" - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'shn162.catalog_category_product_index' doesn't exist";i:1;s:1132:"#0 ..\app\code\core\Mage\Core\Model\Resource\Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 ..\app\code\core\Mage\Core\Model\Resource\Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.4.0.0.44', '1.6.0.0.8')
#2 ..\app\code\core\Mage\Core\Model\Resource\Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.4.0.0.44', '1.6.0.0.8')
#3 ..\app\code\core\Mage\Core\Model\Resource\Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 ..\app\code\core\Mage\Core\Model\App.php(412): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 ..\app\code\core\Mage\Core\Model\App.php(338): Mage_Core_Model_App->_initModules()
#6 ..\app\Mage.php(640): Mage_Core_Model_App->run(Array)
#7 ..\index.php(80): Mage::run('', 'store')
#8 {main}"
;s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}
 
Magento Community Magento Community
Magento Community
Magento Community
 
ctovey
Jr. Member
 
Avatar
Total Posts:  18
Joined:  2012-01-25
Illinois
 

I am having the same problem. Tried upgrading from 1.5 to 1.6.2 and there it is:

“There has been an error processing your request.

This sucks. Why is an upgrade so difficult?

Any ideas on a solution?

Now I can’t even log into my admin panel. Cant see the store. Cant do anything.

 
Magento Community Magento Community
Magento Community
Magento Community
 
NuBlue
Sr. Member
 
Avatar
Total Posts:  94
Joined:  2008-03-31
Lancaster, United Kingdom
 

Hi Phuture,

From the error messages your Magento store is returning it sounds like the database upgrade has not started automatically or has not completed successfully.

With later versions of Magento a empty ‘maintenance.flag’ file can be put in place automatically during the upgrade process in order to preserve data integrity; any database upgrade will not start whilst this flag in place. It is therefore worth checking to see if any such file is present within your web-root directory (httpdocs for Plesk, public_html for cPanel) that could be delaying the upgrade process.

To start the upgrade process you would simply need to remove or rename the file.

ctovey - 15 February 2012 04:14 PM

I am having the same problem. Tried upgrading from 1.5 to 1.6.2 and there it is:

“There has been an error processing your request.

This sucks. Why is an upgrade so difficult?

Any ideas on a solution?

Now I can’t even log into my admin panel. Cant see the store. Cant do anything.

Due to the complex architecture of Magento upgrading represents something of a challenge!

With regards to the error you are receiving, later versions of Magento disable exception logging by default, this is so other visitors do not see the error message printed directly on the frontend of your store.

Output from the error is instead written to a file within <web-root>/var/report, the name of the file is typically a randomly generated integer which corresponds with the number printed on the frontend of your store under “There has been an error processing your request.”

If you view the matching file it will give you more information as to the error message you are receiving.

I hope the above helps, if you can post the error message you are receiving I would be more than happy to take a look for you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Solide
Member
 
Avatar
Total Posts:  44
Joined:  2010-03-13
Netherlands
 

The errors I posted are actually from the upgrade process. I’m aware of the maintenance.flag file but this will do me no good. No matter what I try I end up with the same errors during the upgrade process. The Magento upgrade process really sucks ass but in my case I’m starting to think the database is already corrupt.

I’m gonna look into ways on migrating my orders, customers and product into a clean database as upgrading the current database is not gonna work appearantly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Solide
Member
 
Avatar
Total Posts:  44
Joined:  2010-03-13
Netherlands
 

For reference, I actually managed to fix this in the end. What I did was:

- the first error I ignored and just restarted the upgrade
- the second and third errors I fixed but creating the mentioned tables with the SQL from a clean Magento 1.6.2.0

I’m glad this is over but Magento’s upgrade process sure is a pain in the ass!

 
Magento Community Magento Community
Magento Community
Magento Community
 
utahashi
Jr. Member
 
Total Posts:  1
Joined:  2011-01-28
 

Update 1.5.0.1 - 1.7.0.0

I had the same issue and RESOLVED IT by the following 1.5.0.1 - 1.7.0.0

1. Move live site to test/production server

2. UPDATE the following in core_config_data:
web/unsecure/base_url
web/secure/base_url

3. Modify magento/app/etc/local.xml to point to your database

4. Delete * var/cache and var/session

5. Delete the following from the following tables which is what causes the conflict (contain non essential statistical data):
tables: report_compared_product_index & report_viewed_product_index

6. Run the following commands
chmod 755 mage
rm -rf var/cache/* downloader/pearlib/cache/* downloader/pearlib/download/*
./mage mage-setup .
./mage sync --force
./mage config-set preferred_state stable
./mage list-upgrades
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force
rm -rf var/cache/* downloader/pearlib/cache/* downloader/pearlib/download/*
chmod 755 mage

7. run this command:
php shell/indexer.php reindexall

This step causes an error but this is normal and only happens on the product price this will be fixed further on. There error you will see is:
Product Prices index process unknown error:
exception ‘PDOException’ with message ‘SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘website_date’ in ‘field list’’ in /home/erjpub/documents/public_html/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/erjpub/documents/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/erjpub/documents/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/erjpub/documents/public_html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/erjpub/documents/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /home/erjpub/documents/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’INSERT INTO `ca...’, Array)
#5 /home/erjpub/documents/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query(’INSERT INTO `ca...’, Array)
#6 /home/erjpub/documents/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(1974): Varien_Db_Adapter_Pdo_Mysql->query(’INSERT INTO `ca...’, Array)
#7 /home/erjpub/documents/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(1947): Varien_Db_Adapter_Pdo_Mysql->insertArray(’catalog_product...’, Array, Array)
#8 /home/erjpub/documents/public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(599): Varien_Db_Adapter_Pdo_Mysql->insertMultiple(’catalog_product...’, Array)
#9 /home/erjpub/documents/public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(378): Mage_Catalog_Model_Resource_Product_Indexer_Price->_prepareWebsiteDateTable()
#10 /home/erjpub/documents/public_html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindexAll()
#11 /home/erjpub/documents/public_html/app/code/core/Mage/Index/Model/Process.php(209): Mage_Index_Model_Indexer_Abstract->reindexAll()
#12 /home/erjpub/documents/public_html/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#13 /home/erjpub/documents/public_html/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#14 /home/erjpub/documents/public_html/shell/indexer.php(198): Mage_Shell_Compiler->run()
#15 {main}

8. Continue with the update by running the following commands:
./mage upgrade-all --force
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 777 {} \;
chmod 750 mage
chmod o+w var var/.htaccess app/etc
chmod -R o+w media
chmod -R 777 var/package var/locks var/report var/export downloader

9. Enter the url for your site for the update. It will take a while (long while....BE PATIENT) depending on the size of your site.

Spend 3 days trying to get this working and this is the only thing that worked for me.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top