Giannis Goutzamanis Giannis Goutzamanis - 7 months ago 36
SQL Question

Magento Exception error: SQLSTATE[42S22]: Column not found

After upgrade magento 1.9.1 to 1.9.2.4 I get this error in all category pages. Home page works fine and admin also.
The error is:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.status' in 'where clause', query was: SELECT MAX(e.min_price -(e.min_price/(1+(CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END)+((e.min_price-(e.min_price/(1+(CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END) ) AS m_max_price FROM `catalog_product_index_price` AS `e`
INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=3 AND cat_index.visibility IN(2, 4) AND cat_index.category_id='47' WHERE (e.status = 1) AND ( e.website_id = '1' ) AND ( e.customer_group_id = 0) AND (e.min_price -(e.min_price/(1+(CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END)+((e.min_price- (e.min_price/(1+(CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END))*CASE e.tax_class_id WHEN 1 THEN 0.2300 WHEN 2 THEN 0.2300 WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 WHEN 6 THEN 0.2300 ELSE 0 END) IS NOT NULL) ORDER BY `m_max_price` DESC

Trace:
#0 /var/www/html/site/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/html/site/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/html/site/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /var/www/html/site/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT MAX(e.mi...', Array)
#4 /var/www/html/site/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT MAX(e.mi...', Array)
#5 /var/www/html/site/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /var/www/html/site/app/code/local/Mana/Filters/Resource/Filter/Price.php(223): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select))
#7 /var/www/html/site/app/code/local/Mana/Filters/Model/Filter/Price.php(198): Mana_Filters_Resource_Filter_Price->getMaxPriceOnCollection(Object(ManaPro_FilterSuperSlider_Model_Price), Object(GoMage_Navigation_Model_Resource_Eav_Mysql4_Product_Collection))
#8 /var/www/html/site/app/code/local/Mana/Filters/Model/Query.php(134): Mana_Filters_Model_Filter_Price->getRangeOnCollection(Object(GoMage_Navigation_Model_Resource_Eav_Mysql4_Product_Collection))
#9 /var/www/html/site/app/code/local/Mana/Filters/Model/Filter/Price.php(123): Mana_Filters_Model_Query->getFilterRange('price')
#10 /var/www/html/site/app/code/local/ManaPro/FilterSuperSlider/Model/Price.php(55): Mana_Filters_Model_Filter_Price->getMaxPriceInt()
#11 /var/www/html/site/app/code/local/Mana/Filters/Block/Filter.php(88): ManaPro_FilterSuperSlider_Model_Price->getItemsCount()
#12 /var/www/html/site/app/design/frontend/base/default/template/manapro/filteradvanced/view.phtml(44): Mana_Filters_Block_Filter->getItemsCount()
#13 /var/www/html/site/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/html/s...')
#14 /var/www/html/site/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/base/d...')
#15 /var/www/html/site/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#16 /var/www/html/site/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#17 /var/www/html/site/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#18 /var/www/html/site/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#19 /var/www/html/site/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#20 /var/www/html/site/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#21 /var/www/html/site/app/design/frontend/default/kallyas/template/page/2columns-left.phtml(56): Mage_Core_Block_Abstract->getChildHtml('left')
#22 /var/www/html/site/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/html/s...')
#23 /var/www/html/site/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#24 /var/www/html/site/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#25 /var/www/html/site/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#26 /var/www/html/site/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#27 /var/www/html/site/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#28 /var/www/html/site/app/code/core/Mage/Catalog/controllers/CategoryController.php(161): Mage_Core_Controller_Varien_Action->renderLayout()
#29 /var/www/html/site/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_CategoryController->viewAction()
#30 /var/www/html/site/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view')
#31 /var/www/html/site/app/code/core/Mage/Core/Controller/Varien/Front.php(172) : Mage_Core_Controller_Varien_Router_Standard- >match(Object(Mage_Core_Controller_Request_Http))
#32 /var/www/html/site/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#33 /var/www/html/site/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#34 /var/www/html/site/index.php(83): Mage::run('', 'store')
#35 {main}


Any help please? I don't know how to proceed.

I run this query:

SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME IN ('status') AND TABLE_SCHEMA='mydatabase'


It returns that only this tables have this column:

TABLE_NAME
aw_arp_blocks
blog_post
blog_tag
catalog_product_flat_1
catalog_product_flat_3
cron_schedule
dataflow_batch_export
dataflow_batch_import
dataflow_import_data
downloadable_link_purchased_item
googlecheckout_notification
index_process
index_process_event
kallyas_blog
kallyas_blog_comment
m_seo_schema
m_seo_schema_flat
m_seo_schema_store
m_seo_schema_store_flat
m_seo_url
magemonkey_bulksync_export
magemonkey_bulksync_import
product_alert_price
product_alert_stock
recentreviewproducts


I can't find any e table. What should I check?

Answer

Looking at your Stack Trace, it appears this request uses two different third party modules

Mana_Filters
ManaPro_FilterSuperSlider

It looks like the ManaPro_FilterSuperSlide extension initiates a query that doesn't work with your version of Magento. This is either because

  1. The extension just doesn't work with changes made between 1.9.1 and 1.9.2.4

  2. Your update didn't complete for some reason

I'd start by disabling the ManaPro_FilterSuperSlide extension to see if it clears up the problem.