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

Error when updating from 1.4.2 to 1.6.x
 
queensue63
Jr. Member
 
Total Posts:  3
Joined:  2010-05-08
 

Hi there,
after updating Magento through Magento Connect I received this error

a:5:{i:0;s:188:\"Error in file: \"app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.4.0.0.7-1.4.0.0.8.php\" - Can\’t retrieve entity config: customer/form_attribute\";i:1;s:1014:\"#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.7\’, \’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.7\’, \’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:6:\"/\”;s:11:\"script_name\”;s:15:\"/index.php\”;s:4:\"skin\”;s:7:\"default\";}

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

Did you clear your cache and re-index?

 
Magento Community Magento Community
Magento Community
Magento Community
 
queensue63
Jr. Member
 
Total Posts:  3
Joined:  2010-05-08
 

I did clear the cache but since I don\’t have SSH access to the server, I didn’t know how to re-index without having access to the back end either. Is there a way?

 
Magento Community Magento Community
Magento Community
Magento Community
 
imwy2cool
Sr. Member
 
Total Posts:  164
Joined:  2009-05-07
 

I just completed an upgrade similar to yours from 1.4.0.1 to 1.6.1. It took me about 10 hours to complete.

The database I upgraded has 20,000 skus and 15,000 orders and is over 1gb in size.

I ran into errors similar to what you are describing here probably 25-30 times. I kept reading where people would say “Revert to your backup, your database is corrupt.” They were saying just to start over. Well I tried that 7-8 times after 2-3 hours unsuccessful each time (this is in addition to the successful 9 hour upgrade!). Finally I found a thread that said it took them about 9 hours on a large database. I also found a few other tips saying that they had commented out some code to get their upgrade going again.

So, basically here is what I did to get upgraded to 1.6.1 successfully:

1. Created new installation of 1.6.1
2. Using SSH I navigated to existing 1.4.0.1 site and dumped a database. If you are unfamiliar with SSH . . . well with a large database it’s pretty much the only option, however, for your situation you should be fine.
2. Dropped all new tables in database and imported new database into test database again using SSH.
3. Opened site in a browser and watched the upgrade proceed. After about 20-30 minutes I would get a 503 error and my server would have some real issues keeping up (I am running on two dedicated servers each with 12gb ram, one for database and the other for files).
4. Restart the install by refreshing the page. This is almost always when I ran into the error you are describing here. What I believe is happening is it gets part way through an update script and then the server times out, crashes, or what have you.
5. Comment out code in the referenced file. Sometimes I had to try it a couple of different times.
6. Refresh browser and it would proceed. However, sometimes it would run for just a few seconds and get another error. When this happened I would then uncomment the code I had just commented out. Then, refresh the browser again. Usually, this would allow the install to happily proceed until once again 20-30 minutes later the server would hang, script crash, who knows. I tried to figure it out, but at the time I didn’t know if I was even making progress or wasting time.
7. Rinse and Repeat as needed.
8. One time I couldn’t get past an install script. It just kept giving me “table already exists”, “General error on rename”, “Can’t modify table”. I tried refreshing browser many times. Finally, I renamed script extension to something like “.extension.old.” and refreshed browser and again it started working. At next error I renamed script back and refreshed browser and it went along perfect.

Finally, after 9 grueling hours of this, the site pulled up!

Logged into backend and I reindexed everything, refreshed all caches, tested the front end, backend, etc. I did find a few errors. 

So, then I downloaded the magento database repair script and ran my now upgraded 1.6.1 against a clean install 1.6.1 database. It found a few table errors. So, I let the repair script do it’s thing and then my most of my backend errors were fixed! I was able to disable a few extensions here and there that weren’t compatible with 1.6.1. I then requested new versions of the extensions from developers and spent some time changing class names to make them compatible with other extensions (this store has quite a few extensions).

Store is working perfectly now with just a few small minor bugs I’m working out today.

I had read in other threads people commented out code and it freaked me out! “Hey buddy you can’t just comment out core code!” But, the way I did it I commented and then uncommented and I was actually able to get past what seemed to be dead ends for others.

I believe you can also upgrade through SSH (instead of just visiting the site in a browser), but I was afraid of accidentally upgrading my other databases for other sites (I read in another thread that has happened to others). And, I’m a Noob with SSH so I drudged my way through the browser upgrade.

Hope that helps someone else! All I have to say is Magento should have more “if table already exists” then move on with modifying and adding columns and renaming junk. If the script hangs up part way through then you are going to get that error.

 
Magento Community Magento Community
Magento Community
Magento Community
 
queensue63
Jr. Member
 
Total Posts:  3
Joined:  2010-05-08
 

I’ll give that a try, I’ve been going mad the past three days…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

There is a WIKI for the Manual upgrade process on the Magento site here

http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/manual_upgrade_using_fresh_install_and_original_database

You can re-index your site after an upgrade through SSH like this

./shell php indexer.php reindexall
 
Magento Community Magento Community
Magento Community
Magento Community
 
imwy2cool
Sr. Member
 
Total Posts:  164
Joined:  2009-05-07
 

Something else that might help when you are upgrading (As of this posting I\’m running another upgrade on 1.4.0.1 to 1.6.1.) This second one seems to be going even faster even though the database is even larger. The server on this site has twice as much ram as the other site has which seems to really help.

The thing I was going to mention though is that at least with me I really got frustrated wondering just what WAS happening. The browser just says \"loading\" non stop and so I was tempted to just close the window or tab. However, if you have WHM access then navigate to SQL Services and click on \"Show MYSQL Processes.\” Every time you click on the \"Show MYSQL Processes\” it it will refresh and show you what MYSQL is doing. So, you can at least see that it\’s doing it\’s job.

Then, the other thing you can do is open up phpmyadmin and navigate to your upgrade database. During the upgrade it may take 15-30 minutes for it to open up phpmyadmin, and you\’ll probably have to navigate to the second page (past the first 250 tables). But once it opens you can refresh it from time to time and on occasion you should see a new table or two added to the total number of tables. Again, I emphasize patience grin.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageClub
Guru
 
Avatar
Total Posts:  386
Joined:  2009-07-25
India
 

Not able to get past this,

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘sales_order_status’ already exists

Frustrating!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Thejosh13
Sr. Member
 
Total Posts:  252
Joined:  2008-06-23
 

I was having the same issue upgrading from 1.4 to 1.6.

Started with a less important magento website to test the process. Kept getting: SQLSTATE[42S01]: Base table or view already exists:

Then a max connections issues

I am not even sure how it got fixed but over the weekend it once the max connections were upped it started working

Now I am upgrading another magento and running into
SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘coupon_aggregated_updated’

Makes me wonder how many other issues on the running software that I don’t know about are constantly happening, possibly affecting customers from completing orders. Losing sales. Losing money. I don’t know if it possible to be very confident in magento ever.

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