Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Sidebar Problem
 
CSPalmisano
Member
 
Total Posts:  67
Joined:  2008-05-31
 

I have three categories with sub categories. For whatever reason, those three parent categories are generating the SQL error below in the sidebar. This error doesn’t happen on any of the categories that do NOT have children.

Any help is most appreciated.

SQLSTATE[42S22]Column not found1054 Unknown column 'name' in 'order clause'

#0 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/lib/Zend/Db/Statement.php(283): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/lib/Zend/Db/Adapter/Abstract.php(406): Zend_Db_Statement->execute(Array)
#2 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/lib/Zend/Db/Adapter/Pdo/Abstract.php(206): Zend_Db_Adapter_Abstract->query(Object(Varien_Db_Select), Array)
#3 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/lib/Varien/Db/Adapter/Pdo/Mysql.php(193): Zend_Db_Adapter_Pdo_Abstract->query(Object(Varien_Db_Select), Array)
#4 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/lib/Zend/Db/Adapter/Abstract.php(711): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#5 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Collection.php(371): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select))
#6 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php(92): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection->addCountToCategories(Object(Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection))
#7 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php(78): Mage_Catalog_Model_Layer_Filter_Category->_initItems()
#8 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php(72): Mage_Catalog_Model_Layer_Filter_Abstract->getItems()
#9 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php(94): Mage_Catalog_Model_Layer_Filter_Abstract->getItemsCount()
#10 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Catalog/Block/Layer/View.php(162): Mage_Catalog_Block_Layer_Filter_Abstract->getItemsCount()
#11 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Catalog/Block/Layer/View.php(171): Mage_Catalog_Block_Layer_View->canShowOptions()
#12 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/design/frontend/jnt/jnt/template/catalog/layer/view.phtml(28): Mage_Catalog_Block_Layer_View->canShowBlock()
#13 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Block/Template.php(138): include('/home/jewelznt/...')
#14 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Block/Template.php(170): Mage_Core_Block_Template->fetchView('frontend/jnt/jn...')
#15 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Block/Template.php(187): Mage_Core_Block_Template->renderView()
#16 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Block/Abstract.php(580): Mage_Core_Block_Template->_toHtml()
#17 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Block/Text/List.php(37): Mage_Core_Block_Abstract->toHtml()
#18 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Block/Abstract.php(580): Mage_Core_Block_Text_List->_toHtml()
#19 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Block/Abstract.php(445): Mage_Core_Block_Abstract->toHtml()
#20 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Block/Abstract.php(408): Mage_Core_Block_Abstract->_getChildHtml('right', true)
#21 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/design/frontend/jnt/jnt/template/page/2columns-right.phtml(58): Mage_Core_Block_Abstract->getChildHtml('right')
#22 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Block/Template.php(138): include('/home/jewelznt/...')
#23 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Block/Template.php(170): Mage_Core_Block_Template->fetchView('frontend/jnt/jn...')
#24 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Block/Template.php(187): Mage_Core_Block_Template->renderView()
#25 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Block/Abstract.php(580): Mage_Core_Block_Template->_toHtml()
#26 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Model/Layout.php(508): Mage_Core_Block_Abstract->toHtml()
#27 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Action.php(320): Mage_Core_Model_Layout->getOutput()
#28 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Catalog/controllers/CategoryController.php(88): Mage_Core_Controller_Varien_Action->renderLayout()
#29 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Action.php(343): Mage_Catalog_CategoryController->viewAction()
#30 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(144): Mage_Core_Controller_Varien_Action->dispatch('view')
#31 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Front.php(168): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#32 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/app/Mage.php(420): Mage_Core_Controller_Varien_Front->dispatch()
#33 /home/jewelznt/domains/jewelznthingz.com/public_html/shop/index.php(46): Mage::run()
#34 {main}
 
Magento Community Magento Community
Magento Community
Magento Community
 
CSPalmisano
Member
 
Total Posts:  67
Joined:  2008-05-31
 

If I outdent the child cateogry, the former parent category no longer generates the error.

Any thoughts?

 
Magento Community Magento Community
Magento Community
Magento Community
 
CSPalmisano
Member
 
Total Posts:  67
Joined:  2008-05-31
 

Anyone have any insight?

 
Magento Community Magento Community
Magento Community
Magento Community
 
CSPalmisano
Member
 
Total Posts:  67
Joined:  2008-05-31
 

Anyone else have this problem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Essaouera
Member
 
Total Posts:  45
Joined:  2008-01-22
 

Up… I just met the problem....
Someone has an idea?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mbathon
Jr. Member
 
Total Posts:  1
Joined:  2008-09-10
 

I had the same SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘name’ in ‘order clause’ error

It was solved by going to Catalog > Attributes > Manage Attributes in the admin and changing the name attributes scope from Store View to Global.

Hope that helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Essaouera
Member
 
Total Posts:  45
Joined:  2008-01-22
 

Thanks a lot!
It’s working fine now.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jensta02
Jr. Member
 
Total Posts:  15
Joined:  2008-04-12
 

I was also getting this error when i tried to Sort by Name - changing the attribute worked for me too.

Thanks so much!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top