magento - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'SUM((IFNULL(main_table.base_total_invoiced, 0) -
i on magento 1.9.1 , worked fine. wanted uppgrade zend framework 1.12.7 1.12.13.
after uppdating got error message when logging in backend.
--
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)` `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)` `average` `sales_flat_order` `main_table` (main_table.status not in('canceled')) , (main_table.state not in('new', 'pending_payment')) trace: #0 /home/4/t/tedragen/www/lib/varien/db/statement/pdo/mysql.php(110): zend_db_statement_pdo->_execute(array) #1 /home/4/t/tedragen/www/app/code/core/zend/db/statement.php(291): varien_db_statement_pdo_mysql->_execute(array) #2 /home/4/t/tedragen/www/lib/zend/db/adapter/abstract.php(480): zend_db_statement->execute(array) #3 /home/4/t/tedragen/www/lib/zend/db/adapter/pdo/abstract.php(238): zend_db_adapter_abstract->query('select `sum((if...', array) #4 /home/4/t/tedragen/www/lib/varien/db/adapter/pdo/mysql.php(428): zend_db_adapter_pdo_abstract->query('select `sum((if...', array) #5 /home/4/t/tedragen/www/lib/zend/db/adapter/abstract.php(737): varien_db_adapter_pdo_mysql->query('select `sum((if...', array) #6 /home/4/t/tedragen/www/lib/varien/data/collection/db.php(734): zend_db_adapter_abstract->fetchall('select `sum((if...', array) #7 /home/4/t/tedragen/www/app/code/core/mage/core/model/resource/db/collection/abstract.php(521): varien_data_collection_db->_fetchall('select `sum((if...', array) #8 /home/4/t/tedragen/www/lib/varien/data/collection/db.php(566): mage_core_model_resource_db_collection_abstract->getdata() #9 /home/4/t/tedragen/www/app/code/core/mage/adminhtml/block/dashboard/sales.php(65): varien_data_collection_db->load() #10 /home/4/t/tedragen/www/app/code/core/mage/core/block/abstract.php(293): mage_adminhtml_block_dashboard_sales->_preparelayout() #11 /home/4/t/tedragen/www/app/code/core/mage/core/model/layout.php(456): mage_core_block_abstract->setlayout(object(mage_core_model_layout)) #12 /home/4/t/tedragen/www/app/code/core/mage/adminhtml/block/dashboard.php(54): mage_core_model_layout->createblock('adminhtml/dashb...') #13 /home/4/t/tedragen/www/app/code/core/mage/core/block/abstract.php(293): mage_adminhtml_block_dashboard->_preparelayout() #14 /home/4/t/tedragen/www/app/code/core/mage/core/model/layout.php(456): mage_core_block_abstract->setlayout(object(mage_core_model_layout)) #15 /home/4/t/tedragen/www/app/code/core/mage/core/model/layout.php(472): mage_core_model_layout->createblock('adminhtml/dashb...', 'dashboard') #16 /home/4/t/tedragen/www/app/code/core/mage/core/model/layout.php(239): mage_core_model_layout->addblock('adminhtml/dashb...', 'dashboard') #17 /home/4/t/tedragen/www/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/4/t/tedragen/www/app/code/core/mage/core/model/layout.php(210): mage_core_model_layout->generateblocks(object(mage_core_model_layout_element)) #19 /home/4/t/tedragen/www/app/code/core/mage/core/controller/varien/action.php(344): mage_core_model_layout->generateblocks() #20 /home/4/t/tedragen/www/app/code/core/mage/core/controller/varien/action.php(269): mage_core_controller_varien_action->generatelayoutblocks() #21 /home/4/t/tedragen/www/app/code/core/mage/adminhtml/controller/action.php(275): mage_core_controller_varien_action->loadlayout(null, true, true) #22 /home/4/t/tedragen/www/app/code/core/mage/adminhtml/controllers/dashboardcontroller.php(40): mage_adminhtml_controller_action->loadlayout() #23 /home/4/t/tedragen/www/app/code/core/mage/core/controller/varien/action.php(418): mage_adminhtml_dashboardcontroller->indexaction() #24 /home/4/t/tedragen/www/app/code/core/mage/core/controller/varien/router/standard.php(250): mage_core_controller_varien_action->dispatch('index') #25 /home/4/t/tedragen/www/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/4/t/tedragen/www/app/code/core/mage/core/model/app.php(354): mage_core_controller_varien_front->dispatch() #27 /home/4/t/tedragen/www/app/mage.php(684): mage_core_model_app->run(array) #28 /home/4/t/tedragen/www/index.php(87): mage::run('', 'store') #29 {main}
tried deleting catch , sessions. dont know else. please help.
edit: try deleting old zend framework in lib , copy new 1 in. make sure there no old files left behind.
edit 2: issue was using aoe_classpathcache , didn't know apc on (thought had cleared cache deleting var/cache/classpathcache.php file, still there in apc)
old answer: can consistently reproduce issue in magento 1.9.2, because 1.9.2 upgraded zend framework version 1.12.10 (http://merch.docs.magento.com/ce/user_guide/magento_community_edition_user_guide.html#magento/release-notes-ce-1.9.2.html).
this happens on stock magento version (installation done existing app/etc/local.xml, not following wizard). worked me downgrade 1.9.1.
why did upgrade zend framework anyway? it's bad idea since magento use own fork of zf afaik.
Comments
Post a Comment