Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento: "Cannot reindex."
    primarykey
    data
    text
    <p>My "Category Products" index is having problems. It simply won't reindex. I was on 1.4 when the error started, now I'm on 1.5 and it's still there. </p> <p>I have tried:</p> <ol> <li>Repairing the database with the magento database repair tool</li> <li>Clearing var, all cache, locks, sessions</li> <li>Making sure all permissions are right.</li> <li>Ripping my hair out.</li> </ol> <p>Is there anyway I can investigate this issue further? Error logs don't make note of this problem, and I'm somewhat in the dark. Any help would be very, very appreciated.</p> <p>Edit: After echoing out the error message I get: Report! SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1. </p> <p>Edit 2: I've run a query log and have the following info. If you don't mind taking a look and seeing if a solution springs to mind I'd be very happy. It's slightly over my head...</p> <pre><code>[2011-06-14 12:33:26] SQL: SELECT DISTINCT `catalog_product_bundle_selection`.`parent_product_id` FROM `catalog_product_bundle_selection` WHERE (product_id IN('180')) EXCEPTION exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1' in /my-domain.com/lib/Zend/Db/Statement/Pdo.php:234 Stack trace: #0 /my-domain.com/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo-&gt;_execute(Array) #1 /my-domain.com/lib/Zend/Db/Adapter/Abstract.php(468): Zend_Db_Statement-&gt;execute(Array) #2 /my-domain.com/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract-&gt;query('INSERT INTO cat...', Array) #3 /my-domain.com/lib/Varien/Db/Adapter/Pdo/Mysql.php(335): Zend_Db_Adapter_Pdo_Abstract-&gt;query('INSERT INTO cat...', Array) #4 /my-domain.com/app/code/core/Mage/Index/Model/Mysql4/Abstract.php(159): Varien_Db_Adapter_Pdo_Mysql-&gt;query('INSERT INTO cat...') #5 /my-domain.com/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Indexer/Product.php(522): Mage_Index_Model_Mysql4_Abstract-&gt;insertFromSelect('SELECT? ...', 'catalog_categor...', Array) #6 /my-domain.com/app/code/core/Mage/Index/Model/Indexer/Abstract.php(125): Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Indexer_Product-&gt;reindexAll() #7 /my-domain.com/app/code/core/Mage/Index/Model/Process.php(139): Mage_Index_Model_Indexer_Abstract-&gt;reindexAll() #8 /my-domain.com/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process-&gt;reindexAll() #9 /my-domain.com/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process-&gt;reindexEverything() #10 /my-domain.com/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Index_Adminhtml_ProcessController-&gt;reindexProcessAction() #11 /my-domain.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action-&gt;dispatch('reindexProcess') #12 /my-domain.com/app/code/core/Mage/Core/Controller/Varien/Front.php(177): Mage_Core_Controller_Varien_Router_Standard-&gt;match(Object(Mage_Core_Controller_Request_Http)) #13 /my-domain.com/app/code/core/Mage/Core/Model/App.php(304): Mage_Core_Controller_Varien_Front-&gt;dispatch() #14 /my-domain.com/app/Mage.php(596): Mage_Core_Model_App-&gt;run(Array) #15 /my-domain.com/index.php(81): Mage::run('', 'store') #16 {main} </code></pre> <p>Edit 3: The Query itself!</p> <p>SQL:</p> <pre class="lang-sql prettyprint-override"><code>INSERT INTO catalog_category_anc_products_index_idx SELECT STRAIGHT_JOIN DISTINCT ca.category_id, cp.product_id FROM catalog_category_anc_categs_index_idx AS ca INNER JOIN catalog_category_entity AS ce ON ce.path LIKE ca.path OR ce.entity_id = ca.category_id INNER JOIN catalog_category_product AS cp ON cp.category_id = ce.entity_id INNER JOIN catalog_category_product_index_enbl_idx as pv ON pv.product_id = cp.product_id </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload