0

I have got this weird error when I try to edit a customer. I have checked the table customer_eav_attribute, and sort order column is there. So what is causing this ?

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ca.sort_order' in 'order clause'

#0 /var/www/html/magento1.7/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/html/magento1.7/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/html/fresh/magento1.7/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /var/www/html/fresh/magento1.7/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `main_ta...', Array)
#4 /var/www/html/fresh/magento1.7/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
#5 /var/www/html/magento1.7/lib/Zend/Db/Adapter/Abstract.php(734): Varien_Db_Adapter_Pdo_Mysql->query('SELECT `main_ta...', Array)
#6 /var/www/html/magento1.7/lib/Varien/Data/Collection/Db.php(734): Zend_Db_Adapter_Abstract->fetchAll('SELECT `main_ta...', Array)
#7 /var/www/html/magento1.7/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(521): Varien_Data_Collection_Db->_fetchAll('SELECT `main_ta...', Array)
#8 /var/www/html/fresh/magento1.7/lib/Varien/Data/Collection/Db.php(566): Mage_Core_Model_Resource_Db_Collection_Abstract->getData()
#9 /var/www/html/fresh/magento1.7/lib/Varien/Data/Collection.php(741): Varien_Data_Collection_Db->load()
#10 /var/www/html/magento1.7/app/code/core/Mage/Eav/Model/Form.php(263): Varien_Data_Collection->getIterator()
#11 /var/www/html/magento1.7/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php(67): Mage_Eav_Model_Form->getAttributes()
#12 /var/www/html/fresh/magento1.7/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php(58): Mage_Adminhtml_Block_Customer_Edit_Tab_Account->initForm()
#13 /var/www/html/magento1.7/app/code/core/Mage/Core/Block/Abstract.php(862): Mage_Adminhtml_Block_Customer_Edit_Tabs->_beforeToHtml()
#14 /var/www/html/magento1.7/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#15 /var/www/html/magento1.7/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#16 /var/www/html/magento1.7/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#17 /var/www/html/magento1.7/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#18 /var/www/html/fresh/magento1.7/app/design/adminhtml/default/default/template/page.phtml(58): Mage_Core_Block_Abstract->getChildHtml('left')
#19 /var/www/html/magento1.7/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/html/w...')
#20 /var/www/html/fresh/magento1.7/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#21 /var/www/html/magento1.7/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#22 /var/www/html/fresh/magento1.7/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#23 /var/www/html/fresh/magento1.7/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#24 /var/www/html/fresh/magento1.7/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#25 /var/www/html/fresh/magento1.7/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#26 /var/www/html/magento1.7/app/code/core/Mage/Adminhtml/controllers/CustomerController.php(151): Mage_Core_Controller_Varien_Action->renderLayout()
#27 /var/www/html/fresh/magento1.7/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Adminhtml_CustomerController->editAction()
#28 /var/www/html/fresh/magento1.7/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#29 /var/www/html/fresh/magento1.7/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#30 /var/www/html/fresh/magento1.7/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#31 /var/www/html/fresh/magento1.7/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#32 /var/www/html/fresh/magento1.7/index.php(87): Mage::run('', 'store')
  • Has anyone found the answer??!? – sam yi Feb 14 '17 at 5:30
  • Easiest way to fix this is by running Magento’s database repair tool – Vaishal Patel Feb 14 '17 at 8:58
  • When you had this issue, were you getting it consistently? For me if I refresh, the problem goes away for a while. – sam yi Feb 14 '17 at 21:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.