Magento Stock Status Index Changes to Manual

1.1k views Asked by At

For some reason our Stock Status index is changing to Manual Update from Update on Save. Any reason this would happen on it's own? Perhaps the update on save failed so it switches itself to manual?

1

There are 1 answers

0
loeffel On

I am having the same problem on Magento 1.9.2.2, using the M2E extension.

Within \app\code\community\Ess\M2ePro\Model\Magento\Product\Index.php we can find the following code:

public function disableReindex($code)
{
    /** @var $process Mage_Index_Model_Process */
    $process = $this->getIndexer()->getProcessByCode($code);

    if ($process === false) {
        return false;
    }

    if ($process->getMode() == Mage_Index_Model_Process::MODE_MANUAL) {
        return false;
    }

    $process->setMode(Mage_Index_Model_Process::MODE_MANUAL)->save();

    return true;
}

This part: $process->setMode(Mage_Index_Model_Process::MODE_MANUAL)->save(); changes the index mode to manual update. While there is an enableReindex function that should change the index mode back, for some reason it sometimes fails.

To disable to index mode change, run this sql query:

UPDATE m2epro_config mc SET mc.value = '0' WHERE mc.`group` = '/product/index/' AND mc.`key` = 'mode'