简体   繁体   中英

Magento error with layered navigation

I am using a custom theme from themeforest, I have added all my attributes and attribute sets and a few products so I could test the layerd navigation however when I try to filter down by anything except price or category I get the "There has been an error processing your request" error.

I have noticed that when I filter down by price or category it is adding the option that was choose twice in the "Currently Shopping By" instead of just once and if you click the cross to remove it it will remove both.

But back to the main error maybe that has somehting to do with it not sure, I have pasted the error here:

a:5:{i:0;s:62:"You cannot define a correlation name 'type_idx' more than once";i:1;s:3295:"#0 /home/towelsjt/public_html/lib/Varien/Db/Select.php(281): Zend_Db_Select->_join('inner join', Array, 'type_idx.entity...', Array, NULL)
#1 /home/towelsjt/public_html/lib/Zend/Db/Select.php(336): Varien_Db_Select->_join('inner join', Array, 'type_idx.entity...', Array, NULL)
#2 /home/towelsjt/public_html/lib/Zend/Db/Select.php(315): Zend_Db_Select->joinInner(Array, 'type_idx.entity...', Array, NULL)
#3 /home/towelsjt/public_html/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Attribute.php(70): Zend_Db_Select->join(Array, 'type_idx.entity...', Array)
#4 /home/towelsjt/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php(94): Mage_Catalog_Model_Resource_Layer_Filter_Attribute->applyFilterToCollection(Object(Mage_Catalog_Model_Layer_Filter_Attribute), '35')
#5 /home/towelsjt/public_html/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php(91): Mage_Catalog_Model_Layer_Filter_Attribute->apply(Object(Mage_Core_Controller_Request_Http), Object(Mage_Catalog_Block_Layer_Filter_Attribute))
#6 /home/towelsjt/public_html/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php(73): Mage_Catalog_Block_Layer_Filter_Abstract->_initFilter()
#7 /home/towelsjt/public_html/app/code/core/Mage/Catalog/Block/Layer/View.php(136): Mage_Catalog_Block_Layer_Filter_Abstract->init()
#8 /home/towelsjt/public_html/app/code/core/Mage/Core/Block/Abstract.php(238): Mage_Catalog_Block_Layer_View->_prepareLayout()
#9 /home/towelsjt/public_html/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#10 /home/towelsjt/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('catalog/layer_v...', 'catalog.rightna...')
#11 /home/towelsjt/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('catalog/layer_v...', 'catalog.rightna...')
#12 /home/towelsjt/public_html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#13 /home/towelsjt/public_html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#14 /home/towelsjt/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#15 /home/towelsjt/public_html/app/code/core/Mage/Catalog/controllers/CategoryController.php(146): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#16 /home/towelsjt/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Catalog_CategoryController->viewAction()
#17 /home/towelsjt/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
#18 /home/towelsjt/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /home/towelsjt/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#20 /home/towelsjt/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#21 /home/towelsjt/public_html/index.php(87): Mage::run('', 'store')
#22 {main}";s:3:"url";s:32:"/index.php/products.html?type=35";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

I had almost exactly the same problem and it was indeed a duplication issue causing the error.

I've been using a local.xml file for some layout changes and had duplicated a block somehow /app/design/frontend/default/mytheme/layout.xml

I think you'd have to look in here or catalog.xml

I had the same error. The solution in my case was that I made a layered navigation invisble with "unsetChild" first and then added it again. Removing the first one instead of unsetting it was the solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM