5

Curious question, one of my clients keeps noticing that randomly* individual products will disappear from the front end store view.

* Obviously, I know it isn't random, there must be something triggering it, but there is no common event that is immediately obvious.

I've read this question, however this deals with issues during reindex.

Theres 2 things that we've found we can do to bring the products back into the front end;

  • Simply go into the product and save it
  • Or run a reindex of the product & catalog related indexes

Has anyone run into anything similar before?

The site is fairly high traffic, but has only around 2000 products and 2 store views (only 1 accessible to the public) running 1.4.1.1

2

There's a really good chance that purchases are triggering a re-index that just never completes.

A quick fix

Try setting your indexes to "Manual Update" rather than "Update on Save" and see if it helps things as you progress.

Diagnosis

Diagnosis of the issue would be a case of looking at what products are missing, then looking at the respective index tables in the DB to identify where it is missing from.

Then observe/log when that index is being triggered/run and when - then backtrace from there.


There will be no 1 right answer here, but if you diagnose properly, you'll find the reason.

  • massive thanks for the reply. I've gone ahead and changed the product related indexes to 'Manual Update'. I'll start trying to take a look into the index tables - although it may not happen now I've adjusted the indexes! – thebluefox Mar 7 '13 at 9:39
  • any update if this worked? I'm having this problem now also where did you locate Manual Update? – CodingMageSheen Dec 8 '16 at 23:43
0

We have the same problem... The problem happens after we send our newsletter and we get a flood of traffic on the site. So I believe it has to do with the indexing not finishing?

The way we have been fixing it is to save the product, even without changes. This seems to reindex properly, and resolve the issue, till it happens again. It usually only happens 1-3 times a day.

I traced the SQL that the category page uses to get the products, and it joins these 3 tables. catalog_product_flat_1 catalog_category_product_index catalog_product_index_price

The missing product was in catalog_product_flat_1 and catalog_category_product_index, but was not in catalog_product_index_price.

So catalog_product_index_price is the table that is not indexing properly.

I read on this page (https://stackoverflow.com/questions/17373381/magento-ee-missing-products-in-catalog-product-index-price) That the catalog_product_index_price table gets populated based on the stock status, so it doesn't bother to reindex them if the stock_status is 0.

Not sure why this is happening. I went deep into the indexing code and started to get lost.

Thought I would post this info, and see if some one can figure out the final piece of this puzzle.

0

We can fix that issue by overrite Full.php model

Follow below steps to overite,

app\code\Modules\Catalog\etc\di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Catalog\Model\Indexer\Category\Product\Action\Full" type="Modules\Catalog\Model\Indexer\Category\Product\Action\Full" />
</config>


app\code\Modules\Catalog\Model\Indexer\Category\Product\Action\Full.php

<?php 
namespace Modules\Catalog\Model\Indexer\Category\Product\Action;

/**
 * Class AbstractAction
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/

class Full extends \Magento\Catalog\Model\Indexer\Category\Product\Action\Full {

    public function isRangingNeeded() {
        return false; // It was "True" as default setting.
    }
}


php bin/magento cache:clean
php bin/magento indexer:reindex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.