cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED] Sql errors when Use Flat Product Catalog enabled

[SOLVED] Sql errors when Use Flat Product Catalog enabled

Hi,

We're trying to get our 1.9.2.1 site to use the flat product catalog, but when we enable it we're getting the following error:

 

 

a:5:{i:0;s:488:"SQLSTATE[42S22] [1054] Unknown column 'e.status' in 'where clause', query was: SELECT MAX(e.min_price  ) 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=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '33' WHERE (e.status = 1) AND ( e.website_id = '1' ) AND ( e.customer_group_id = 0) AND (e.min_price   IS NOT NULL) ORDER BY `m_max_price` DESC";i:1;s:4332:"#0 /var/www/mysite/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute()
#1 /var/www/mysite/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute()
#2 /var/www/mysite/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute()
#3 /var/www/mysite/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query()
#4 /var/www/mysite/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query()
#5 /var/www/mysite/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query()
#6 /var/www/mysite/app/code/local/Mana/Filters/Resource/Filter/Price.php(223): Zend_Db_Adapter_Abstract->fetchOne()
#7 /var/www/mysite/app/code/local/Mana/Filters/Model/Filter/Price.php(198): Mana_Filters_Resource_Filter_Price->getMaxPriceOnCollection()
#8 /var/www/mysite/app/code/local/Mana/Filters/Model/Query.php(134): Mana_Filters_Model_Filter_Price->getRangeOnCollection()
#9 /var/www/mysite/app/code/local/Mana/Filters/Model/Filter/Price.php(123): Mana_Filters_Model_Query->getFilterRange()
#10 /var/www/mysite/app/code/local/Mana/Filters/Model/Filter/Price.php(380): Mana_Filters_Model_Filter_Price->getMaxPriceInt()
#11 /var/www/mysite/app/code/local/Mana/Filters/Model/Filter/Price.php(53): Mana_Filters_Model_Filter_Price->getPriceRange()
#12 /var/www/mysite/app/code/local/Mana/Filters/Model/Filter/Price.php(255): Mana_Filters_Model_Filter_Price->_getItemsData()
#13 /var/www/mysite/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php(120): Mana_Filters_Model_Filter_Price->_initItems()
#14 /var/www/mysite/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php(109): Mage_Catalog_Model_Layer_Filter_Abstract->getItems()
#15 /var/www/mysite/app/code/local/Mana/Filters/Block/Filter.php(88): Mage_Catalog_Model_Layer_Filter_Abstract->getItemsCount()
#16 /var/www/mysite/app/design/frontend/base/default/template/manapro/filteradvanced/view.phtml(44): Mana_Filters_Block_Filter->getItemsCount()
#17 /var/www/mysite/app/code/core/Mage/Core/Block/Template.php(241): include()
#18 /var/www/mysite/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView()
#19 /var/www/mysite/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#20 /var/www/mysite/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#21 /var/www/mysite/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#22 /var/www/mysite/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#23 /var/www/mysite/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#24 /var/www/mysite/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml()
#25 /var/www/mysite/app/design/frontend/ultimo/default/template/page/2columns-left.phtml(55): Mage_Core_Block_Abstract->getChildHtml()
#26 /var/www/mysite/app/code/core/Mage/Core/Block/Template.php(241): include()
#27 /var/www/mysite/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView()
#28 /var/www/mysite/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#29 /var/www/mysite/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#30 /var/www/mysite/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#31 /var/www/mysite/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#32 /var/www/mysite/app/code/core/Mage/Catalog/controllers/CategoryController.php(161): Mage_Core_Controller_Varien_Action->renderLayout()
#33 /var/www/mysite/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_CategoryController->viewAction()
#34 /var/www/mysite/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch()
#35 /var/www/mysite/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match()
#36 /var/www/mysite/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#37 /var/www/mysite/app/Mage.php(684): Mage_Core_Model_App->run()
#38 /var/www/mysite/index.php(83): Mage::run()
#39 {main}";s:3:"url";s:30:"/footwear/hers/high-heels.html";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

We've cleared the cache, reindexed etc multiple times, all to no avail.

 

 

What seems strange is that looking at the sql statement, it's looking for a column `status` in  `catalog_product_index_price`, as far as I'm aware, this shouldn't exist.

1 REPLY 1

Re: [SOLVED] Sql errors when Use Flat Product Catalog enabled

Turns out it was the Manadev Layered Navigation module we were using.

 

Upgraded, and now all fixed Smiley Happy