Bugfix - Magento 1.4.2.0 search not working properly / showing same results for all searches Print

  • 15

If you are having problems with your search after upgrading to 1.4.2.0, ensure that you have reindexed all data (System > Index Management) and cleared all cache. If you are still getting inconsistent results, such as the same results returned regardless of the search, then this is most likely related to a bug in Magento 1.4.2.0.

To create a workaround, do the following:

Create a copy of app/code/core/Mage/CatalogSearch/Block/Result.php and save it to app/code/local/Mage/CatalogSearch/Block/Result.php.

Edit the copied file with the following changes:

Uncomment line 149 and 150

//        $this->getListBlock()
//           ->setCollection($this->_getProductCollection());

to
$this->getListBlock()
           ->setCollection($this->_getProductCollection());

Change line 172

$this->_productCollection = $this->getListBlock()->getLoadedProductCollection();
to
$this->_productCollection = Mage::getSingleton('catalogsearch/layer')->getProductCollection();

More Info:

http://www.magentocommerce.com/boards/viewthread/178347/P15/

If you are a Create Hosting customer on the Magento Hosting Plan, feel free to submit a support ticket and we can take care of this issue for you.


Was this answer helpful?

« Back