Magento – SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘e.Featured’ in ‘where clause’

magento-1.8magento-enterpriseprogrammingtheme

HI All Respected Magento Devs,
I was customizing my magento website after theme installation and i am not sure how it could happened but my site stopped working due to this below error. strangely my inner pages are working if i access them my page name but home page stopped working. i have attach my file as well in which error is coming.
please some one help me.

Detailed Error

Fatal error: Call to a member function getBackend() on a non-object in /xxxxxx/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 816

Error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘e.Featured’ in ‘where clause’

Trace:

#0 /xxxxxx/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) 
#1 /xxxxxx/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array) 
#2 /xxxxxx/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array) 
#3 /xxxxxx/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’SELECT DISTINCT...’, Array) 
#4 /xxxxxx/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query(’SELECT DISTINCT...’, Array) 
#5 /xxxxxx/lib/Zend/Db/Adapter/Abstract.php(825): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array) 
#6 /xxxxxx/lib/Varien/Data/Collection/Db.php(225): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select), Array) 
#7 /xxxxxx/app/design/frontend/default/galaelectronues/template/em_featured_products/featured_grid.phtml(10): Varien_Data_Collection_Db->getSize() 
#8 /xxxxxx/app/code/core/Mage/Core/Block/Template.php(241): include(’/var/www/vhosts...’) 
#9 /xxxxxx/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView(’frontend/defaul...’) 
#10 /xxxxxx/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView() 
#11 /xxxxxx/app/code/local/EM/Dynamicproducts/Block/Dynamicproducts.php(32): Mage_Core_Block_Template->_toHtml() 
#12 /xxxxxx/app/code/core/Mage/Core/Block/Abstract.php(919): EM_Dynamicproducts_Block_Dynamicproducts->_toHtml() 
#13 /xxxxxx/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml() 
#14 /xxxxxx/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml() 
#15 /xxxxxx/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml() 
#16 /xxxxxx/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml(’em_area7’, true) 
#17 /xxxxxx/app/code/local/EM/Themeframework/Helper/Theme.php(82): Mage_Core_Block_Abstract->getChildHtml(’em_area7’) 
#18 /xxxxxx/app/design/frontend/default/galaelectronues/template/page/2columns-left.phtml(16): EM_Themeframework_Helper_Theme->display(Object(Mage_Page_Block_Html), ‘2columns-left’) 
#19 /xxxxxx/app/code/core/Mage/Core/Block/Template.php(241): include(’/var/www/vhosts...’) 
#20 /xxxxxx/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView(’frontend/defaul...’) 
#21 /xxxxxx/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView() 
#22 /xxxxxx/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml() 
#23 /xxxxxx/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml() 
#24 /xxxxxx/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput() 
#25 /xxxxxx/app/code/core/Mage/Cms/Helper/Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout() 
#26 /xxxxxx/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), ‘galaelectronues...’) 
#27 /xxxxxx/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), ‘galaelectronues...’) 
#28 /xxxxxx/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction() 
#29 /xxxxxx/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch(’index’) 
#30 /xxxxxx/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) 
#31 /xxxxxx/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch() 
#32 /xxxxxx/app/Mage.php(684): Mage_Core_Model_App->run(Array) 
#33 /xxxxxx/index.php(87): Mage::run(’’, ‘store’) 
#34 {main}

Thank You

Best Answer

You're probably using either some commercial theme that is not correctly installed or try to create new installation using existing codebase.

The problem you're having is that the theme REQUIRES you to have an attribute "Featured" and is unable to find it. Fatal error: Call to a member function getBackend() on a non-object is the dead ringer of such issue.

If you use third party theme, please see what attributes must be generated. If you're using existing theme, check original installation attribute list for the attribute. If both of the options are off the table, just check what the theme wants to do with the "Feature" attribute. Or you could just try empirical approach and generate an attribute "feature".

PS. It's good practice to create installation script that automatically generates all required attributes.