1

I've just upgraded my store from 1.9.3 (which had a glitch in the search that showed all products when searching) to 1.9.3.1, and now the search shows no products.

What I've tried:

  • Roolback the file app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php to version 1.9.3 and 1.9.2.4
  • Cleared Cache
  • Reindexed
  • Changed folder permissions

When I retore the files from version 1.9.3 the search start "working" again (showing all the products)

The only search module I use is one that show proviews of the products, and this module is working fine.

Thanks all!

  • Just go through these answer magento.stackexchange.com/a/140708/45103 – Gopal Patel Nov 21 '16 at 6:01
  • Thank you for your comment. This is a fix for all products showing on search (a glitch from 1.9.3), i'm now on 1.9.3.1, which "fixes" this glitch, but now no products are shown, instead of all products. I want to show the products related to the search, not all and not none. – Pablo Nov 21 '16 at 11:08
  • @Pablo : is it solve your problem? – user51361 May 3 '17 at 4:16
  • I did what @Densen answered, which is not exactly a solution, but it's the closest I could get to fixing my problem. – Pablo May 3 '17 at 12:34
1

After upgrading from 1.9.2.4 to 1.9.3.1 I had a similar problem and I have just fixed it.

In my case the rendering of the whole page stopped after the header. That means, no product related to the search was shown and e.g. the footer wasn't rendered, as well.

I had a modified Fulltext.php in app/code/local/Mage/CatalogSearch/Model/Resource which had some minor changes in the prepareResult() function. I diffed my local file, the one from 1.9.2.4 and the one from 1.9.3.1. I recognized that a new protected class variable called $_foundData and additionally the getter for this variable was introduced in 1.9.3.1. I added both to my local file and after that the page was correctly rendering again, but still no product related to the search was shown.

That was, because of several changes happened in the prepareResult() function from 1.9.2.4 to 1.9.3.1. I applied the changes to my local file and now the catalog search is working fine again.

If this does not solve your problem, take a look at the other changes of the CatalogSearch module that happened from 1.9.2.4/1.9.3 to 1.9.3.1. Maybe you override other files of this module or use an extension that overrides files of this module.

  • Thanks, I ended up doing that, I'm using the search module from 1.9.2.4, which is not exactly a solution, but it's the closest I could get to fixing my problem. – Pablo Nov 23 '16 at 18:23
1

it appears as though the Mage_CatalogSearch_Block_Result has an issue, it changes _getProductCollection() where it used to get the product collection via Mage::getSingleton('catalogsearch/layer')->getProductCollection() it now gets it from the child list block which doesn't appear to be search results, $this->getListBlock()->getLoadedProductCollection()

revert changes to both setListCollection() and _getProductCollection() and it may work (did for me anyhow):

public function setListCollection()
{
    $this->getListBlock()
       ->setCollection($this->_getProductCollection());
   return $this;
}

protected function _getProductCollection()
{
    if (is_null($this->_productCollection)) {
        $this->_productCollection = Mage::getSingleton('catalogsearch/layer')->getProductCollection();
    }

    return $this->_productCollection;
}

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