Magento 1.9.1.0 - Unable to generate the sitemap - magento

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"

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 Reindex error on "Category Products"

After using MAGMI to import all of my products into my Magento site, the catalog_category_product index is giving the following error when running the indexer.php from the command line. (php -f indexer.php -- --reindex catalog_category_product).
Category Products index process unknown error:
exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ''' in /srv/www/magento1-8/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /srv/www/magento1-8/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /srv/www/magento1-8/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /srv/www/magento1-8/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /srv/www/magento1-8/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /srv/www/magento1-8/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('DELETE FROM ``', Array)
#5 /srv/www/magento1-8/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('DELETE FROM ``', Array)
#6 /srv/www/magento1-8/lib/Zend/Db/Adapter/Abstract.php(661): Varien_Db_Adapter_Pdo_Mysql->query('DELETE FROM ``')
#7 /srv/www/magento1-8/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php(941): Zend_Db_Adapter_Abstract->delete(NULL)
#8 /srv/www/magento1-8/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Category_Indexer_Product->reindexAll()
#9 /srv/www/magento1-8/app/code/core/Mage/Index/Model/Process.php(210): Mage_Index_Model_Indexer_Abstract->reindexAll()
#10 /srv/www/magento1-8/app/code/core/Mage/Index/Model/Process.php(258): Mage_Index_Model_Process->reindexAll()
#11 /srv/www/magento1-8/shell/indexer.php(166): Mage_Index_Model_Process->reindexEverything()
#12 /srv/www/magento1-8/shell/indexer.php(212): Mage_Shell_Compiler->run()
#13 {main}
Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ''' in /srv/www/magento1-8/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /srv/www/magento1-8/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /srv/www/magento1-8/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /srv/www/magento1-8/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /srv/www/magento1-8/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('DELETE FROM ``', Array)
#4 /srv/www/magento1-8/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('DELETE FROM ``', Array)
#5 /srv/www/magento1-8/lib/Zend/Db/Adapter/Abstract.php(661): Varien_Db_Adapter_Pdo_Mysql->query('DELETE FROM ``')
#6 /srv/www/magento1-8/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php(941): Zend_Db_Adapter_Abstract->delete(NULL)
#7 /srv/www/magento1-8/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Category_Indexer_Product->reindexAll()
#8 /srv/www/magento1-8/app/code/core/Mage/Index/Model/Process.php(210): Mage_Index_Model_Indexer_Abstract->reindexAll()
#9 /srv/www/magento1-8/app/code/core/Mage/Index/Model/Process.php(258): Mage_Index_Model_Process->reindexAll()
#10 /srv/www/magento1-8/shell/indexer.php(166): Mage_Index_Model_Process->reindexEverything()
#11 /srv/www/magento1-8/shell/indexer.php(212): Mage_Shell_Compiler->run()
#12 {main}
Before inserting this new data into my site, I had used the MAGMI Clear Catalog v1.0.3 Utility to clear the catalog, removed unused attribute_sets and added new attributes and attribute_sets.
Any recommendations on how to troubleshoot this problem would be greatly appreciated.
Thanks
Just import this sql to reset the categories it helps me (v 1.7)
http://pastebin.com/iCSH64zb
if 1.8 has another tables structure, just make a new installation of magento with your version to the new db and export of the following tables:
catalog_category_entity
catalog_category_entity_datetime
catalog_category_entity_decimal
catalog_category_entity_int
catalog_category_entity_text
catalog_category_entity_varchar
and import it to your DB (make backup before)

Magento Product Attributes index process unknown error after importing multiselect attribute

After importing a multiselect product attribute, when I try to reindex from magento admin the indexer shows error. "There was a problem with reindexing process."
Exception log :
2012-12-05T12:21:36+00:00 DEBUG (7): Exception message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '185-154-1-843' for key 'PRIMARY'
Trace: #0 /opt/lampp/htdocs/mise/lib/Varien/Db/Statement/Pdo/Mysql.php(111): Zend_Db_Statement_Pdo->_execute(Array)
#1 /opt/lampp/htdocs/mise/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /opt/lampp/htdocs/mise/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /opt/lampp/htdocs/mise/lib/Zend/Db/Adapter/Pdo/Abstract.php(239): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#4 /opt/lampp/htdocs/mise/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#5 /opt/lampp/htdocs/mise/lib/Varien/Db/Adapter/Pdo/Mysql.php(1974): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...', Array)
#6 /opt/lampp/htdocs/mise/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php(276): Varien_Db_Adapter_Pdo_Mysql->insertArray('catalog_product...', Array, Array)
#7 /opt/lampp/htdocs/mise/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php(257): Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source->_saveIndexData(Array)
#8 /opt/lampp/htdocs/mise/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php(84): Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source->_prepareMultiselectIndex(NULL, NULL)
#9 /opt/lampp/htdocs/mise/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Abstract.php(50): Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source->_prepareIndex()
#10 /opt/lampp/htdocs/mise/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php(185): Mage_Catalog_Model_Resource_Product_Indexer_Eav_Abstract->reindexAll()
#11 /opt/lampp/htdocs/mise/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Eav->reindexAll()
#12 /opt/lampp/htdocs/mise/app/code/core/Mage/Index/Model/Process.php(209): Mage_Index_Model_Indexer_Abstract->reindexAll()
#13 /opt/lampp/htdocs/mise/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#14 /opt/lampp/htdocs/mise/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#15 /opt/lampp/htdocs/mise/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#16 /opt/lampp/htdocs/mise/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#17 /opt/lampp/htdocs/mise/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 /opt/lampp/htdocs/mise/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#19 /opt/lampp/htdocs/mise/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#20 /opt/lampp/htdocs/mise/index.php(87): Mage::run('', 'store')
#21 {main}
The product import file contains only 2 columns sku and attribute value
Also I tried manual import using custom php code. Same error...!!!
I think 185 in '185-154-1-843' is product id. So i went admin and just saved the product and error for that product solved but it shows duplicate entry for another product. :(
please help
Worked for me:
Try deleting the product in admin with id 185 and importing again, as it shows:
Exception message: SQLSTATE[23000]: Integrity constraint violation: 1062
Duplicate entry '185-154-1-843' for key 'PRIMARY'
which means that there are duplicated product ids.
Just keep deleting the error ids.
I had same issue. You can do something else than deleting the product :
We solved this by editing attribute which was a multiselect and inside this array of values, we had 2 times the same value!
If it occurs to someone else, just look at the attribute's value,
merge siblings by removing double value and it might solve your issue.
On my case we could see that by selecting our product id ( first value inside the error duplicate entry) and having a look to the attribute mentionned ( second value in error)

Magento - Cannot run reindexing, missing column in database

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!

Catalog URL Rewrites index stuck

My catalog URL Rewrites in Magento are stuck on processing. When I run the shell/indexer.php script I get the following error
Catalog URL Rewrites index process unknown error: exception
'PDOException' with message 'SQLSTATE[23000]: Integrity constraint
violation: 1062 Duplicate entry 'sugar-tablets.html-1' for key 2' in
/home/healthra/public_html/lib/Zend/Db/Statement/Pdo.php:228 Stack
trace: #0
/home/healthra/public_html/lib/Zend/Db/Statement/Pdo.php(228):
PDOStatement->
execute(Array) #1
/home/healthra/public_html/lib/Zend/Db/Statement.php(300):
Zend_Db_Statement_
Pdo->_execute(Array) #2
/home/healthra/public_html/lib/Zend/Db/Adapter/Abstract.php(479):
Zend_Db_Sta
tement->execute(Array) #3
/home/healthra/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238):
Zend_Db
_Adapter_Abstract->query('UPDATE mg_core...', Array) \#4
/home/healthra/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(337):
Zend_Db_
Adapter_Pdo_Abstract->query('UPDATEmg_core...', Array) #5
/home/healthra/public_html/lib/Zend/Db/Adapter/Abstract.php(632):
Varien_Db_A
dapter_Pdo_Mysql->query('UPDATE `mg_core...', Array) #6
/home/healthra/public_html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysq
l4/Url.php(257):
Zend_Db_Adapter_Abstract->update('mg_core_url_rew...', Array, '
url_rewrite_id=...') #7
/home/healthra/public_html/app/code/core/Mage/Catalog/Model/Url.php(363):
Mag
e_Catalog_Model_Resource_Eav_Mysql4_Url->saveRewrite(Array,
Object(Varien_Object
)) #8
/home/healthra/public_html/app/code/core/Mage/Catalog/Model/Url.php(559):
Mag
e_Catalog_Model_Url->_refreshProductRewrite(Object(Varien_Object),
Object(Varien
_Object)) #9
/home/healthra/public_html/app/code/core/Mage/Catalog/Model/Url.php(253):
Mag
e_Catalog_Model_Url->refreshProductRewrites('1') #10
/home/healthra/public_html/app/code/core/Mage/Catalog/Model/Url.php(246):
Ma
ge_Catalog_Model_Url->refreshRewrites('1') #11
/home/healthra/public_html/app/code/core/Mage/Catalog/Model/Indexer/Url.php(
249): Mage_Catalog_Model_Url->refreshRewrites() #12
/home/healthra/public_html/app/code/core/Mage/Index/Model/Process.php(139):
Mage_Catalog_Model_Indexer_Url->reindexAll() #13
/home/healthra/public_html/app/code/core/Mage/Index/Model/Process.php(167):
Mage_Index_Model_Process->reindexAll() #14
/home/healthra/public_html/shell/indexer.php(158):
Mage_Index_Model_Process-
reindexEverything()
#15
/home/healthra/public_html/shell/indexer.php(198):
Mage_Shell_Compiler->run(
) #16 {main}
Does anyone have any suggestions on how to debug this problem?
Have a look here: Magento Puts -1 in My URLs Can I Remove Programatically? and also here: http://www.magentocommerce.com/boards/viewthread/9342/.
I found that removing all lock files in /path/to/mage/var/locks/index_process*.lock, truncating core_url_rewrite and then reindexing cleared the issue.

Resources