Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
can’t rebuild search after upgrading 1.2.0
 
WishingDigital
Jr. Member
 
Total Posts:  3
Joined:  2008-11-06
 

I followed the instructions for upgrading to 1.2.0 from 1.1.8, but when I attempt to rebuild the search index as instructed, i get the following error:

Fatal error: Call to a member function setAttribute() on a non-object in /home/jsularsk/public_html/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php on line 351

can anyone help? my search is now broken and anything you search for returns no results.

thank you!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jdurand
Jr. Member
 
Total Posts:  9
Joined:  2008-05-16
 

I’m having a similar issue.  How did you go about trying to rebuild the search?

 
Magento Community Magento Community
Magento Community
Magento Community
 
eagleeyed
Member
 
Total Posts:  32
Joined:  2008-08-21
 

I am having exactly the same problem, so will watch this thread aswell.  I have done a detailed explanation and outlined the offending line here: http://www.magentocommerce.com/boards/viewthread/27151/

Hope we all get this problem fixed soon. smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
tomfeng
Jr. Member
 
Total Posts:  8
Joined:  2008-12-04
 

I didn’t even see any ‘Rebuild’ button in Cache Management after upgrading from 1.1.8 to 1.2.0...and any word searched does not return any result :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
eagleeyed
Member
 
Total Posts:  32
Joined:  2008-08-21
 
tomfeng - 31 December 2008 01:32 AM

I didn’t even see any ‘Rebuild’ button in Cache Management after upgrading from 1.1.8 to 1.2.0...and any word searched does not return any result :(

Make sure your permissions are set to allow it to update on the folders.  My host for some reason has most files go back to 644 when Magento Updates them, so if you update again without changing it back to 775 it will say it has updated, when it actually hasnt.

As for this search problem, I have narrowed it down.  I installed it them same way both times, same location, same everything, this problem only occurs when I use my existing MySQL database, when I created a new one I did not experience this problem, so either something has gone wrong when it updated or has not been updated at all.

If someone has any suggestions it would be greatly appreciated.

For now, as I have a strict deadline, and was needing to do something like this.  I am starting a fresh and am not trying to recover the products.  I have the limited functioning site working under a subdomain and am transferring all information I need off it as I go.

Good luck everyone!

 
Magento Community Magento Community
Magento Community
Magento Community
 
mbguy
Jr. Member
 
Avatar
Total Posts:  14
Joined:  2008-07-01
 

what files/folders did you have to change?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Unirgy
Guru
 
Avatar
Total Posts:  478
Joined:  2007-09-07
 

I’ve attached a file with fix for this problem, upload it to this location:
app/code/local/Mage/CatalogSearch/Model/Mysql4/Fulltext.php

After this issue is fixed in core, delete this file.

The diff, if anyone is interested:

IndexFulltext.php
===================================================================
--- 
Fulltext.php
+++ Fulltext.php
@@ -333,+333,@@
         if (
is_null($this->_searchableAttributes)) {
             $this
->_searchableAttributes = array();
             
$entityType $this->getEavConfig()->getEntityType('catalog_product');
+            
$entity     $entityType->getEntity();
+
             
$select $this->_getReadAdapter()->select()
                 ->
from($this->getTable('eav/attribute'), array('attribute_code'))
                 ->
where('entity_type_id=?'$entityType->getEntityTypeId())
@@ -
341,+343,@@
             
$this->getEavConfig()->preloadAttributes($entityType$attributeCodes);
             foreach (
$attributeCodes as $attributeCode{
                 $attribute 
$this->getEavConfig()->getAttribute($entityType$attributeCode);
+                
$attribute->setEntity($entity);
                 
$this->_searchableAttributes[$attribute->getId()$attribute;
             
}
         }
@@ -377,+380,@@
                 
}
             }
         }
-        return $this->getEavConfig()->getAttribute($attribute);
+        return 
$this->getEavConfig()->getAttribute('catalog_product'$attribute);
     
}
File Attachments
Fulltext.php  (File Size: 20KB - Downloads: 1000)
 
Magento Community Magento Community
Magento Community
Magento Community
 
rrroulio
Sr. Member
 
Avatar
Total Posts:  88
Joined:  2008-03-26
france moselle
 

I love you guy. It works like a charm !

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jaheed
Jr. Member
 
Total Posts:  10
Joined:  2009-01-27
 

You are gooood smile worked for me also. Just one thing I uploaded in a diffrent path.

Not in app/code/LOCAL/Mage/CatalogSearch/Model/Mysql4/Fulltext.php

But in app/code/CORE/Mage/CatalogSearch/Model/Mysql4/Fulltext.php

Thanks, it was a big help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ceirysdesigner
Jr. Member
 
Total Posts:  10
Joined:  2009-01-30
 

Hi there I too need some help on this as my search is not working also after the update.

I don’t have the mage file in this patch location = app/code/local/Mage/CatalogSearch/Model/Mysql4/Fulltext.php

I tried to do it Jaheed’s way but it did not work still - app/code/CORE/Mage/CatalogSearch/Model/Mysql4/Fulltext.php

Does this look right please ?

<img src=http://i37.photobucket.com/albums/e69/nickthebrickie/screenshot.jpg>

 
Magento Community Magento Community
Magento Community
Magento Community
 
ceirysdesigner
Jr. Member
 
Total Posts:  10
Joined:  2009-01-30
 

Ok it’s sorted now fixed in Cache Management !

Cheers found the answer on another thread !

 
Magento Community Magento Community
Magento Community
Magento Community
 
liotropi
Sr. Member
 
Total Posts:  182
Joined:  2008-02-21
Athens, Greece
 

thanx - fixed it for my shop

 
Magento Community Magento Community
Magento Community
Magento Community
 
mamaduckie
Jr. Member
 
Total Posts:  7
Joined:  2009-01-12
 

Installed in CORE/Mage… like Jaheed.  Worked like a charm!  Thanks!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
moleygunn
Member
 
Total Posts:  73
Joined:  2008-11-25
 

I had a similar problem to this after upgrading to 1.3.0. What I did was create a column called ‘is_processed’ in the table catalogsearch_query using MyPHPAdmin. I found this was missing from a different error, which I got when I tried to duplicate a product. The error was Unknown column ‘is_processed’ in ‘field list’

I can now rebuild the search index, and the frontend search works.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ifry
Jr. Member
 
Total Posts:  10
Joined:  2009-11-27
 

OMG! It worked! I had a problem on rebuil search index on Magento 1.3.2.4 and it worked fine for me! Thank you soooo much you saved my life! smile

Unfortunately there is another problem here…

Rebuilding Flat Products give me this error:

Fatal error: Uncaught exception ‘Zend_Db_Statement_Exception’ with message ‘SQLSTATE[08S01]: Communication link failure: 1053 Server shutdown in progress’ in /home/*myusername*/public_html/store/lib/Zend/Db/Statement/Pdo.php:238 Stack trace: #0 /home/*myusername*/public_html/store/lib/Zend/Db/Statement.php(283): Zend_Db_Statement_Pdo->_execute(Array) #1 /home/*myusername*public_html/store/lib/Zend/Db/Adapter/Abstract.php(457): Zend_Db_Statement->execute(Array) #2 /home/*myusername*/public_html/store/lib/Zend/Db/Adapter/Pdo/Abstract.php(230): Zend_Db_Adapter_Abstract->query(’UPDATE `rp_cata...’, Array) #3 /home/*myusername*/public_html/store/lib/Varien/Db/Adapter/Pdo/Mysql.php(281): Zend_Db_Adapter_Pdo_Abstract->query(’UPDATE `rp_cata...’, Array) #4 /home/*myusername*/public_html/store/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(726): Varien_Db_Adapter_Pdo_Mysql->query(’UPDATE `rp_cata...’) #5 /home/*myusername*/public_html/store/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(744): Mage_Catal in /home/*myusername*/public_html/store/lib/Zend/Db/Statement/Pdo.php on line 238

Any suggestion?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sheri
Jr. Member
 
Total Posts:  26
Joined:  2008-12-21
Tennessee
 

Did not work for me for some reason. I am using the newest version 1.4 stable. Is this solution different for that version?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2