问题
I have just reindexed the data on my Magenot installation running v1.6 and i'm now getting a message stating
There was a problem with reindexing process.
for Category Products and now no products are displayed in any any of the categories. I need to fix this asap as its happened on a live site.
Does anyone have any idea what might be causing this and what the fix is?
I have tried deleting the contents on var/report and var/locks but no joy. There seems to be a few fixes but not specifically for Category Products
Thanks in advance
回答1:
This could be anything. The
There was a problem with reindexing process.
error occurs when a PHP Exception bubbles up to the surface from the reindexProcessAction
action. You can see that code here.
#File: app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php
public function reindexProcessAction()
{
$process = $this->_initProcess();
if ($process) {
try {
Varien_Profiler::start('__INDEX_PROCESS_REINDEX_ALL__');
$process->reindexEverything();
Varien_Profiler::stop('__INDEX_PROCESS_REINDEX_ALL__');
$this->_getSession()->addSuccess(
Mage::helper('index')->__('%s index was rebuilt.', $process->getIndexer()->getName())
);
} catch (Mage_Core_Exception $e) {
$this->_getSession()->addError($e->getMessage());
} catch (Exception $e) {
$this->_getSession()->addException($e,
Mage::helper('index')->__('There was a problem with reindexing process.')
);
}
} else {
$this->_getSession()->addError(
Mage::helper('index')->__('Cannot initialize the indexer process.')
);
}
$this->_redirect('*/*/list');
}
Specifically, this line
Mage::helper('index')->__('There was a problem with reindexing process.')
The quickest way to the bottom of this error is to temporarily change the above line so that it prints out the exception message. Magento surpress the default exception message — probably in an effort to prevent end-users from seeing an "ugly" PHP error. Change the above to it reads
Mage::helper('index')->__('There was a problem with reindexing process. ' . $e->getMessage())
And then reindex again. The PHP error message, which should point to the problem code, will be included in your error message. This should help point to the exact problem that's causing your index to fail.
回答2:
Hey buddy you can truncate the table of catalog and run the reindex again and it will run with a charm.. tables name to truncate catalog_product_flat_*
"CAUTION: before making any changes in database take a backup" mysqldump [dbname]> [anyname].sql
回答3:
Here I found another solution and its work for me. I first create reindex.php and it place in my root folder then past below code
require_once 'app/Mage.php';
umask( 0 );
Mage :: app( "default" );
Mage::log("Started Rebuilding Search Index At: " . date("d/m/y h:i:s"));
$sql = "truncate csr_catalogsearch_fulltext;";
$mysqli = Mage::getSingleton('core/resource')->getConnection('core_write');
$mysqli->query($sql);
for ($i = 1; $i <= 9; $i++) {
$process = Mage::getModel('index/process')->load($i);
$process->reindexAll();
}
echo Mage::log("Finished Rebuilding Search Index At: " . date("d/m/y h:i:s"));
After run this file (www.example.com/reindex.php) I got an an error message like as ..
General error: 1005 Can't create table catalog_category_flat_store_1' (errno: 150)
Then I just run the following query in my database. Like as
ALTER TABLE catalog_category_entity ENGINE=INNODB;
ALTER TABLE core_store ENGINE=INNODB;
Then clean all cache and run re-index process from amdin panel and it's run successfully. I recommended to I'm not sure if it will help at all with your issue.
回答4:
Here is what worked for me:
find core_url_rewrite, backup the table then Truncate it.
clear all cashes
reindex catalog index rewrites in index management
All should be good now...
来源:https://stackoverflow.com/questions/9927020/magento-there-was-a-issue-with-reindexing-process-catalog-products