简体   繁体   English

Magento错误与分层导航

[英]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. 我正在使用来自themeforest的自定义主题,我添加了所有属性和属性集以及一些产品,因此我可以测试分层导航,但是当我尝试过滤除了价格或类别之外的任何东西我得到了“有一个处理您的请求时出错“错误。

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 我一直在使用local.xml文件进行一些布局更改,并以某种方式重复了一个块/app/design/frontend/default/mytheme/layout.xml

I think you'd have to look in here or catalog.xml 我想你必须在这里或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. 在我的案例中的解决方案是我首先使用“unsetChild”进行分层导航,然后再添加它。 Removing the first one instead of unsetting it was the solution. 删除第一个而不是取消它是解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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