Magento – Front end is completely down

frontend

I set up our Magento site for a family member a while ago and everything has been fine… until now…

He went on holiday, when he came back, our front page had an error with a security thing saying that they can't show the error. After following instructions on a Q&A page, the front page now looks like this

the error

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'FLOOR(((e.min_price  ) * 1) / 100) + 1' in 'order clause', query was: SELECT FLOOR(((e.min_price  ) * 1) / 100) + 1 AS `range`, COUNT(*) AS `count` FROM `mage_catalog_product_index_price` AS `e`
 INNER JOIN `mage_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 = '2'
 LEFT JOIN `mage_cataloginventory_stock_status` AS `cisi` ON (cisi.product_id=e.entity_id) AND (cisi.website_id = '1') WHERE ( e.website_id = '1' ) AND ( e.customer_group_id = 0) AND (e.min_price > 0) GROUP BY FLOOR(((e.min_price  ) * 1) / 100) + 1 ORDER BY `FLOOR(((e`.`min_price  ) * 1) / 100) + 1` ASC

Trace:
#0 /home/classicspares/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/classicspares/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/classicspares/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/classicspares/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT FLOOR(((...', Array)
#4 /home/classicspares/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT FLOOR(((...', Array)
#5 /home/classicspares/public_html/lib/Zend/Db/Adapter/Abstract.php(811): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/classicspares/public_html/app/code/local/Mana/Filters/Resource/Filter/Price.php(121): Zend_Db_Adapter_Abstract->fetchPairs(Object(Varien_Db_Select))
#7 /home/classicspares/public_html/app/code/local/Mana/Filters/Model/Filter/Price.php(174): Mana_Filters_Resource_Filter_Price->countOnCollection(Object(Mage_Catalog_Model_Resource_Product_Collection), Object(Mana_Filters_Model_Filter_Price))
#8 /home/classicspares/public_html/app/code/local/Mana/Filters/Model/Query.php(172): Mana_Filters_Model_Filter_Price->countOnCollection(Object(Mage_Catalog_Model_Resource_Product_Collection))
#9 /home/classicspares/public_html/app/code/local/Mana/Filters/Model/Filter/Price.php(379): Mana_Filters_Model_Query->getFilterCounts('price', false)
#10 /home/classicspares/public_html/app/code/local/Mana/Filters/Model/Filter/Price.php(53): Mana_Filters_Model_Filter_Price->getPriceRange()
#11 /home/classicspares/public_html/app/code/local/Mana/Filters/Model/Filter/Price.php(238): Mana_Filters_Model_Filter_Price->_getItemsData()
#12 /home/classicspares/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php(120): Mana_Filters_Model_Filter_Price->_initItems()
#13 /home/classicspares/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php(109): Mage_Catalog_Model_Layer_Filter_Abstract->getItems()
#14 /home/classicspares/public_html/app/code/local/Mana/Filters/Block/Filter.php(88): Mage_Catalog_Model_Layer_Filter_Abstract->getItemsCount()
#15 /home/classicspares/public_html/app/design/frontend/base/default/template/catalog/layer/view.phtml(49): Mana_Filters_Block_Filter->getItemsCount()
#16 /home/classicspares/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/classicsp...')
#17 /home/classicspares/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/base/d...')
#18 /home/classicspares/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#19 /home/classicspares/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#20 /home/classicspares/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#21 /home/classicspares/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#22 /home/classicspares/public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#23 /home/classicspares/public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#24 /home/classicspares/public_html/app/design/frontend/base/default/template/page/2columns-left.phtml(50): Mage_Core_Block_Abstract->getChildHtml('left')
#25 /home/classicspares/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/classicsp...')
#26 /home/classicspares/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/base/d...')
#27 /home/classicspares/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#28 /home/classicspares/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#29 /home/classicspares/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#30 /home/classicspares/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#31 /home/classicspares/public_html/app/code/core/Mage/Cms/Helper/Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#32 /home/classicspares/public_html/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
#33 /home/classicspares/public_html/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home')
#34 /home/classicspares/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#35 /home/classicspares/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#36 /home/classicspares/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))
#37 /home/classicspares/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#38 /home/classicspares/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#39 /home/classicspares/public_html/index.php(87): Mage::run('', 'store')
#40 {main}

Error log record number: 284895657995

I am not sure what has happened nor what the hell this error is but any help would be greatly appreciated.

Best Answer

On line 114 in:

app/code/local/Mana/Filters/Resource/Filter/Price.php

Change:

$select->group($rangeExpr)->order("$rangeExpr ASC");

To:

$select->group($rangeExpr)->order($rangeExpr, "ASC");

This fixed my problem using Manadev Layered Navigation (Mage 1.9.1)

Related Topic