cancel
Showing results for 
Search instead for 
Did you mean: 

Column not found Error After Upgrade, Unable to Access Admin

SOLVED

Column not found Error After Upgrade, Unable to Access Admin

We were performing an upgrade of all available updates to the Community Edition (via the Magento admin - not a manual upgrade) and now cannot access the Admin area with the following error:

 

There has been an error processing your request
Exception printing is disabled by default for security reasons.

Error log record number: 1127165937042

 

When I check that record, it indicates the following:

 

a:5:{i:0;s:1075:"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'SUM((IFNULL(main_table.base_total_invoiced, 0) - IFNULL(main_table.base_tax_invoiced, 0) - IFNULL(main_table.base_shipping_invoiced, 0) - (IFNULL(main_table.base_total_refunded, 0) - IFNULL(ma' in 'field list', query was: SELECT `SUM((IFNULL(main_table.base_total_invoiced, 0) - IFNULL(main_table.base_tax_invoiced, 0) - IFNULL(main_table.base_shipping_invoiced, 0) - (IFNULL(main_table.base_total_refunded, 0) - IFNULL(main_table.base_tax_refunded, 0) - IFNULL(main_table.base_shipping_refunded, 0))) * main_table`.`base_to_global_rate)` AS `lifetime`, `AVG((IFNULL(main_table.base_total_invoiced, 0) - IFNULL(main_table.base_tax_invoiced, 0) - IFNULL(main_table.base_shipping_invoiced, 0) - (IFNULL(main_table.base_total_refunded, 0) - IFNULL(main_table.base_tax_refunded, 0) - IFNULL(main_table.base_shipping_refunded, 0))) * main_table`.`base_to_global_rate)` AS `average` FROM `lssales_flat_order` AS `main_table` WHERE (main_table.status NOT IN('canceled')) AND (main_table.state NOT IN('new', 'pending_payment'))";i:1;s:4168:"#0 /home/lisawestern26/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/lisawestern26/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/lisawestern26/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/lisawestern26/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `SUM((IF...', Array)
#4 /home/lisawestern26/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `SUM((IF...', Array)
#5 /home/lisawestern26/public_html/lib/Zend/Db/Adapter/Abstract.php(737): Varien_Db_Adapter_Pdo_Mysql->query('SELECT `SUM((IF...', Array)
#6 /home/lisawestern26/public_html/lib/Varien/Data/Collection/Db.php(734): Zend_Db_Adapter_Abstract->fetchAll('SELECT `SUM((IF...', Array)
#7 /home/lisawestern26/public_html/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(521): Varien_Data_Collection_Db->_fetchAll('SELECT `SUM((IF...', Array)
#8 /home/lisawestern26/public_html/lib/Varien/Data/Collection/Db.php(566): Mage_Core_Model_Resource_Db_Collection_Abstract->getData()
#9 /home/lisawestern26/public_html/app/code/core/Mage/Adminhtml/Block/Dashboard/Sales.php(65): Varien_Data_Collection_Db->load()
#10 /home/lisawestern26/public_html/app/code/core/Mage/Core/Block/Abstract.php(293): Mage_Adminhtml_Block_Dashboard_Sales->_prepareLayout()
#11 /home/lisawestern26/public_html/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(ArexMage_AMTheme_Model_System_Layout_Layout))
#12 /home/lisawestern26/public_html/app/code/core/Mage/Adminhtml/Block/Dashboard.php(54): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...')
#13 /home/lisawestern26/public_html/app/code/core/Mage/Core/Block/Abstract.php(293): Mage_Adminhtml_Block_Dashboard->_prepareLayout()
#14 /home/lisawestern26/public_html/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(ArexMage_AMTheme_Model_System_Layout_Layout))
#15 /home/lisawestern26/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...', 'dashboard')
#16 /home/lisawestern26/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('adminhtml/dashb...', 'dashboard')
#17 /home/lisawestern26/public_html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#18 /home/lisawestern26/public_html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#19 /home/lisawestern26/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#20 /home/lisawestern26/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#21 /home/lisawestern26/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#22 /home/lisawestern26/public_html/app/code/core/Mage/Adminhtml/controllers/DashboardController.php(40): Mage_Adminhtml_Controller_Action->loadLayout()
#23 /home/lisawestern26/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_DashboardController->indexAction()
#24 /home/lisawestern26/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#25 /home/lisawestern26/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#26 /home/lisawestern26/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#27 /home/lisawestern26/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#28 /home/lisawestern26/public_html/index.php(87): Mage::run('', 'store')
#29 {main}";s:3:"url";s:70:"/index.php/admin/dashboard/index/key/f53abb513ee6b857db086f2abcf2c54c/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

 

Any idea where to start debugging this? I found similar threads related to this, but couldn't find any with a workable solution. The front end of the site works fine but we can't access the admin area.

 

Thanks,

Brad Hopkins

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Column not found Error After Upgrade, Unable to Access Admin

I found a solution on the Magento Stack Exchange.

 

I needed to replace app/code/core/Zend with a version from 1.9.2 CE. Once I did this, the admin was functional again.

 

Thanks for the help.

View solution in original post

6 REPLIES 6

Re: Column not found Error After Upgrade, Unable to Access Admin

Hi @firebrandmedia,

 

You can start debugging by disabling custom extensions one by one and check if the error is gone.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: Column not found Error After Upgrade, Unable to Access Admin

Thanks for the follow up. Is there a way to disable all extensions via ftp so that we can regain access to the cp? Or, what's the best approach when locked out of the cp like this? Thanks, Brad

Re: Column not found Error After Upgrade, Unable to Access Admin

For disabling extensions you need to comment the extension from global configuration file avilable into the Magento Root -> App -> Etc -> Modules folder.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: Column not found Error After Upgrade, Unable to Access Admin

@firebrandmedia From which version of Magento you are trying to update to which version?

You can disable all local module at once Go to app/etc/local.xml file 

 <disable_local_modules>false</disable_local_modules>

and change above to true and clear all your caches.

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: Column not found Error After Upgrade, Unable to Access Admin

A client was updating their store and I don't recall which specific version they had - seem to recall that it was 1.8.x - but they were using the instructions here (http://merch.docs.magento.com/ce/user_guide-Jan-8/content/magento/magento-connect-update-magento.htm... to update to the current version (1.9.2.0, I believe).

 

I tried disabling the modules as you instructed but I still receive the same error. By clearing caches you mean to go to var/cache and remove all of the directories, correct? I did that as well as clearing browser caches with no luck.

 

In this discussion (http://community.magento.com/t5/Version-Upgrades/Errors-after-installing-1-9-2/m-p/10290#M605) they indicated that "Cleaning the cache and reindexing fixed this issue for me." How would you go about reindxing? Is that through the CP the database?

 

There is also this discussion (http://community.magento.com/t5/Version-Upgrades/Exception-Printing-Error-after-Magento-CE-1-9-2-0-U... which was solved by "Reorginizing Flat File Data" Is that done through the CP or is there some way to do it without CP access?

 

Thanks for the help.

Re: Column not found Error After Upgrade, Unable to Access Admin

I found a solution on the Magento Stack Exchange.

 

I needed to replace app/code/core/Zend with a version from 1.9.2 CE. Once I did this, the admin was functional again.

 

Thanks for the help.