Magento - Cannot run reindexing, missing column in database - magento

I'm running with an extension for my layered navigation, which worked well till I tried to update it to a never version. I'm not able to reindex the extension again, this is what i get from it:
2012-11-29T21:35:30+01:00 DEBUG (7): Exception message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'target.default_mask1' in 'field list'
Trace: #0 /var/www/site.com/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/site.com/public_html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/site.com/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /var/www/site.com/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT DISTINCT...', Array)
#4 /var/www/site.com/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('SELECT DISTINCT...', Array)
#5 /var/www/site.com/public_html/lib/Zend/Db/Adapter/Abstract.php(734): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /var/www/site.com/public_html/app/code/local/Mana/Db/Helper/Data.php(146): Zend_Db_Adapter_Abstract->fetchAll(Object(Varien_Db_Select))
#7 /var/www/site.com/public_html/app/code/local/Mana/Db/Model/Indexer.php(36): Mana_Db_Helper_Data->replicate()
#8 /var/www/site.com/public_html/app/code/core/Mage/Index/Model/Process.php(207): Mana_Db_Model_Indexer->reindexAll()
#9 /var/www/site.com/public_html/app/code/core/Mage/Index/Model/Process.php(253): Mage_Index_Model_Process->reindexAll()
#10 /var/www/site.com/public_html/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#11 /var/www/site.com/public_html/app/code/local/Mage/Core/Controller/Varien/Action.php(420): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#12 /var/www/site.com/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#13 /var/www/site.com/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))
#14 /var/www/site.com/public_html/app/code/local/Mage/Core/Model/App.php(348): Mage_Core_Controller_Varien_Front->dispatch()
#15 /var/www/site.com/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#16 /var/www/site.com/public_html/index.php(82): Mage::run('', 'store')
And this is the replicate:
2012-11-29T21:49:20+01:00 DEBUG (7): UPDATE: SELECT DISTINCT 'target'.'id', 'target'.'code', 'target'.'type', 'target'.'default_mask0', 'target'.'default_mask1', 'eav_attribute_additional'.'is_filterable' AS 'is_enabled', 'eav_attribute'.'frontend_label' AS 'name', 'eav_attribute_additional'.'is_filterable_in_search' AS 'is_enabled_in_search', 'eav_attribute_additional'.'position' FROM 'eav_attribute'
INNER JOIN 'catalog_eav_attribute' AS 'eav_attribute_additional' ON eav_attribute.attribute_id = eav_attribute_additional.attribute_id
INNER JOIN 'eav_entity_type' ON eav_attribute.entity_type_id = eav_entity_type.entity_type_id
INNER JOIN 'm_filter2' AS 'target' ON target.code = eav_attribute.attribute_code WHERE (eav_entity_type.entity_type_code = 'catalog_product') AND (eav_attribute_additional.is_filterable <> 0)
If however, I remove the 'target','default_mask1' part, I'am able to find the attributes. I also found the default_mask in eav_attribute, but I'm not able to figure out what exactly the problem is unfortunatly. Any help would be appreciated!
(The extension is Manapro seo layered navigation)

The problem was that the "upgrade" was interrupted due to visitors on the site. I put down the site, removed the /includes/ folder, ran a script from the developer in the sql, re-cached, and all worked as a charm again! So a lesson to myself, always put down the site before upgrading extensions!

Related

Debugging SQL Syntax Error in Magento Extension

I’m fairly new to Magento and encounter this error when I try to debug an extension I installed recently. I’m trying to understand the log, but left wondering what exactly is the problem. Can anyone tell me where I should start debugging based on the following log?
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS `query_id`, `s`.`product_id`, MATCH (s.data_index) AGAINST ('' IN BOOLEAN MOD' at line 1
Trace:
#0 /var/www/html/springmaternity/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/html/springmaternity/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/html/springmaternity/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /var/www/html/springmaternity/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#4 /var/www/html/springmaternity/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#5 /var/www/html/springmaternity/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php(393): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...', Array)
#6 /var/www/html/springmaternity/app/code/core/Mage/CatalogSearch/Model/Fulltext.php(136): Mage_CatalogSearch_Model_Resource_Fulltext->prepareResult(Object(Mage_CatalogSearch_Model_Fulltext), '', Object(Yireo_DisableLog_Model_Rewrite_Catalogsearch_Query))
#7 /var/www/html/springmaternity/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Collection.php(55): Mage_CatalogSearch_Model_Fulltext->prepareResult()
#8 /var/www/html/springmaternity/app/code/core/Mage/CatalogSearch/Model/Layer.php(58): Mage_CatalogSearch_Model_Resource_Fulltext_Collection->addSearchFilter('')
#9 /var/www/html/springmaternity/app/code/community/Rayfox/Catalog/Model/Search/Layer.php(18): Mage_CatalogSearch_Model_Layer->prepareProductCollection(Object(Mage_CatalogSearch_Model_Resource_Fulltext_Collection))
#10 /var/www/html/springmaternity/app/code/core/Mage/CatalogSearch/Model/Layer.php(42): Rayfox_Catalog_Model_Search_Layer->prepareProductCollection(Object(Mage_CatalogSearch_Model_Resource_Fulltext_Collection))
#11 /var/www/html/springmaternity/app/code/core/Mage/Catalog/Model/Layer.php(290): Mage_CatalogSearch_Model_Layer->getProductCollection()
#12 /var/www/html/springmaternity/app/code/core/Mage/Catalog/Model/Layer.php(220): Mage_Catalog_Model_Layer->_getSetIds()
#13 /var/www/html/springmaternity/app/code/core/Mage/Catalog/Block/Layer/View.php(163): Mage_Catalog_Model_Layer->getFilterableAttributes()
#14 /var/www/html/springmaternity/app/code/local/FME/Layerednav/Block/Layer/View.php(85): Mage_Catalog_Block_Layer_View->_getFilterableAttributes()
#15 /var/www/html/springmaternity/app/code/core/Mage/Core/Block/Abstract.php(293): FME_Layerednav_Block_Layer_View->_prepareLayout()
#16 /var/www/html/springmaternity/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#17 /var/www/html/springmaternity/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('layerednav/sear...', 'layer')
#18 /var/www/html/springmaternity/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('layerednav/sear...', 'layer')
#19 /var/www/html/springmaternity/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))
#20 /var/www/html/springmaternity/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#21 /var/www/html/springmaternity/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#22 /var/www/html/springmaternity/app/code/local/FME/Layerednav/controllers/FrontController.php(54): Mage_Core_Controller_Varien_Action->loadLayout()
#23 /var/www/html/springmaternity/app/code/core/Mage/Core/Controller/Varien/Action.php(418): FME_Layerednav_FrontController->searchAction()
#24 /var/www/html/springmaternity/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('search')
#25 /var/www/html/springmaternity/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#26 /var/www/html/springmaternity/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#27 /var/www/html/springmaternity/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#28 /var/www/html/springmaternity/sg/index.php(90): Mage::run('sg', 'website')
#29 {main}
If you have a model, that is doing query and you are curious what the SQL that will be generated you have a few choices,
My favorite is to use the following
$collection = Mage::getModel('customcodes/code')->getCollection()
->addFieldToSelect('code')
->addFieldToFilter('order_id',array('eq'=>247938))
->addFieldToFilter('code_type',array('eq'=>'CODESQAC'));
$sql = $collection->getSelect()->__toString();
And then $sql would have
SELECT `main_table`.`code` FROM `custom_codes` AS `main_table` WHERE (`order_id` = 247938) AND (`code_type` = 'CODESQAC')
Now you can work through the Magneto syntax to figure out why its not pulling the results OR throwing errors like you are seeing.
It sounds like you know where the Magento code is coming from, so using this method will help you figure out if the syntax they used was incorrect.
Also, check the code for hard coded table names instead of using the Magento factory method and/or calls to specific table names rather than using something like the follwoing to get the actual table name ( you could have a table name prefix and the original code could just be hard coded )
$resource = Mage::getSingleton('core/resource');
$customer_table = $resource->getTableName('customer/entity');
Here is an example of using the hard coded table names rather than using configuration to get the table table name, in the case of table name prefixes
$collection->getSelect()->joinLeft(array('sfoa'=>'sales_flat_order_address'), 'main_table.entity_id = sfoa.parent_id and sfoa.address_type = \'billing\'', array('sfoa.company'));
The proper way would be something like this
$resource = Mage::getSingleton('core/resource');
$sales_table = $resource->getTableName('sales/order_address');
$collection->getSelect()->joinLeft(array('sfoa'=>$sales_table), 'main_table.entity_id = sfoa.parent_id and sfoa.address_type = \'billing\'', array('sfoa.company'));
Hopefully this will help you check for bad syntax and eventually how and what the actual SQL is being created.

Magento 1.9.1.0 - Unable to generate the sitemap

I guess if you meet the same error when trying to create the Google Sitemap from Magento 1.9.1.0 backend (Unable to generate the sitemap).
Under is what I found from the Exception Log:
2015-05-09T09:52:02+00:00 DEBUG (7): Exception message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'main_table.entity_id' in 'on clause', query was: SELECT `e`.`entity_id`, `e`.`created_at`, `e`.`updated_at`, `ur`.`request_path` AS `url` FROM `tts_catalog_category_entity` AS `e`
LEFT JOIN `tts_core_url_rewrite` AS `ur` ON e.entity_id=ur.category_id AND ur.store_id='1' AND ur.product_id IS NULL AND ur.is_system=1
INNER JOIN `tts_catalog_category_entity_int` AS `t1_is_active` ON main_table.entity_id=t1_is_active.entity_id AND t1_is_active.store_id=0
LEFT JOIN `tts_catalog_category_entity_int` AS `t2_is_active` ON t1_is_active.entity_id = t2_is_active.entity_id AND t1_is_active.attribute_id = t2_is_active.attribute_id AND t2_is_active.store_id = '1' WHERE (e.path LIKE '1/2/%') AND (t1_is_active.attribute_id='42') AND ((IF(t2_is_active.value_id > 0, t2_is_active.value, t1_is_active.value))=1)
Trace: #0 /home/blairsin/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/blairsin/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/blairsin/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/blairsin/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `e`.`ent...', Array)
#4 /home/blairsin/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `e`.`ent...', Array)
#5 /home/blairsin/public_html/app/code/community/Activo/Xmlsitemap/Model/Sitemap/Resource/Catalog/Category.php(47): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select))
#6 /home/blairsin/public_html/app/code/community/Activo/Xmlsitemap/Model/Sitemap/Sitemap.php(28): Activo_Xmlsitemap_Model_Sitemap_Resource_Catalog_Category->getCollection('1')
#7 /home/blairsin/public_html/app/code/core/Mage/Adminhtml/controllers/SitemapController.php(255): Activo_Xmlsitemap_Model_Sitemap_Sitemap->generateXml()
#8 /home/blairsin/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_SitemapController->generateAction()
#9 /home/blairsin/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('generate')
#10 /home/blairsin/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))
#11 /home/blairsin/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#12 /home/blairsin/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#13 /home/blairsin/public_html/index.php(87): Mage::run('base', 'website')
#14 {main}
This should be an error happened when generating the MySQL sentence, a "main_table" table was inserted and it cannot be found in the database.
I think this is a Magento core code error - please help me figure it out.
Thank you.
You are using a module (Activo_Xmlsitemap) which is rewriting the model of sitemap based on the code of an older Magento version.
I used to have the same issue after upgrading Magento 1.7 to Magento 1.9
The override needs to be adjusted by changing the table alias of catalog_category_entity from "e" to "main_table"

Magento empty blank product page

I got some problems with my magento store. The product page view is empty.
I've debugged it and in the exception log I got this message:
2014-02-18T21:45:34+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Method "addJqueryLibrary" is not defined in "Magentothem_Upsellslider_Model_Layout_Generate_Observer"' in /home/mellimello/public_html/app/Mage.php:595
Stack trace:
#0 /home/mellimello/public_html/app/code/core/Mage/Core/Model/App.php(1340): Mage::throwException('Method "addJque...')
#1 /home/mellimello/public_html/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Magentothem_Upsellslider_Model_Layout_Generate_Observer), 'addJqueryLibrar...', Object(Varien_Event_Observer))
#2 /home/mellimello/public_html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#3 /home/mellimello/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(351): Mage::dispatchEvent('controller_acti...', Array)
#4 /home/mellimello/public_html/app/code/core/Mage/Catalog/Helper/Product/View.php(73): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#5 /home/mellimello/public_html/app/code/core/Mage/Catalog/Helper/Product/View.php(144): Mage_Catalog_Helper_Product_View->initProductLayout(Object(Mage_Catalog_Model_Product), Object(Mage_Catalog_ProductController))
#6 /home/mellimello/public_html/app/code/core/Mage/Catalog/controllers/ProductController.php(132): Mage_Catalog_Helper_Product_View->prepareAndRender(6, Object(Mage_Catalog_ProductController), Object(Varien_Object))
#7 /home/mellimello/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_ProductController->viewAction()
#8 /home/mellimello/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
#9 /home/mellimello/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))
#10 /home/mellimello/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#11 /home/mellimello/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#12 /home/mellimello/public_html/index.php(87): Mage::run('', 'store')
#13 {main}
It looks like the module Magentothem Upsellslider is broken. If you installed the module from somewhere else, contact the creator and tell them it isn't working. In the meantime, uninstall it by removing the file app/code/etc/modules/Magentothem_Upsellslider.xml and clear your cache.
If this is your module, you seem to be trying to call a non-existent function addJqueryLibrary in your observer. Perhaps you have a typo... should it be addJQueryLibrary?

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'customgrid_grid_role' doesn't exist

I've been successfully using the Enhanced Admin Grids for magento extension for a quite a while so when I found out that editing the quantity is now supported in the latest version I automatically tried upgrading to 0.8.9 However I keep getting this error when attempting to go into the catalog:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'buyahood_shopithoodies.customgrid_grid_role' doesn't exist
Trace:
#0 /home/buyahood/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/buyahood/public_html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/buyahood/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/buyahood/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT customg...', Array)
#4 /home/buyahood/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('SELECTcustomg...', Array)
#5 /home/buyahood/public_html/lib/Zend/Db/Adapter/Abstract.php(734): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/buyahood/public_html/app/code/community/BL/CustomGrid/Model/Mysql4/Grid.php(153): Zend_Db_Adapter_Abstract->fetchAll(Object(Varien_Db_Select))
#7 /home/buyahood/public_html/app/code/community/BL/CustomGrid/Model/Grid.php(2254): BL_CustomGrid_Model_Mysql4_Grid->getGridRoles('1')
#8 /home/buyahood/public_html/app/code/community/BL/CustomGrid/Model/Grid.php(217): BL_CustomGrid_Model_Grid->loadRolesConfig()
#9 /home/buyahood/public_html/app/code/community/BL/CustomGrid/Model/Grid.php(223): BL_CustomGrid_Model_Grid->_refreshConfig()
#10 /home/buyahood/public_html/app/code/core/Mage/Core/Model/Abstract.php(281): BL_CustomGrid_Model_Grid->_afterLoad()
#11 /home/buyahood/public_html/lib/Varien/Data/Collection.php(454): Mage_Core_Model_Abstract->afterLoad()
#12 /home/buyahood/public_html/app/code/community/BL/CustomGrid/Model/Mysql4/Grid/Collection.php(27): Varien_Data_Collection->walk(Array, Array)
#13 /home/buyahood/public_html/lib/Varien/Data/Collection/Db.php(536): BL_CustomGrid_Model_Mysql4_Grid_Collection->_afterLoad('afterLoad')
#14 /home/buyahood/public_html/app/code/community/BL/CustomGrid/Model/Observer.php(734): Varien_Data_Collection_Db->load()
#15 /home/buyahood/public_html/app/code/core/Mage/Core/Model/App.php(1303): BL_CustomGrid_Model_Observer->onControllerActionPreDispatch()
#16 /home/buyahood/public_html/app/code/core/Mage/Core/Model/App.php(1284): Mage_Core_Model_App->_callObserverMethod(Object(Varien_Event_Observer))
#17 /home/buyahood/public_html/app/Mage.php(416): Mage_Core_Model_App->dispatchEvent(Object(BL_CustomGrid_Model_Observer), 'onControllerAct...', Object(Varien_Event_Observer))
#18 /home/buyahood/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(505): Mage::dispatchEvent('controller_acti...', Array)
#19 /home/buyahood/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php(152): Mage_Core_Controller_Varien_Action->preDispatch('controller_acti...', Array)
#20 /home/buyahood/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(409): Mage_Adminhtml_Controller_Action->preDispatch()
#21 /home/buyahood/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch()
#22 /home/buyahood/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match('index')
#23 /home/buyahood/public_html/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch(Object(Mage_Core_Controller_Request_Http))
#24 /home/buyahood/public_html/app/Mage.php(640): Mage_Core_Model_App->run()
#25 /home/buyahood/public_html/index.php(82): Mage::run(Array)
#26 {main}
Please Advise.
This table should have been created during upgrade. Looks like the upgrade script didn't run. To trigger it again, edit the core_resource table. Search for a row with customgrid_setup and reset the version number to your version before your upgrade. After that, flush magento cache in backend. On the next page call the installer will be rerun.

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.

Resources