Magento Forum

Page 1 of 2
Search Broken
 
eagleeyed
Member
 
Total Posts:  32
Joined:  2008-08-21
 

Hello,

I have recently done a fresh install of Magento to this latest version, then used the MySQL database from the production website.

I thought everything had gone perfectly, so I have merged the two now.  I have noticed the search is no longer functioning anymore, I went to clear out the cache, still no success and have now noticed the new Rebuild Search Index button available in cache options, however this no longer functions for me.

It instantly regenerates a error:

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

This is the affected part of code in Abstract.php

public function getSource()
    
{
        
if (empty($this->_source)) {
            
if (!$this->getSourceModel()) {
                $this
->setSourceModel($this->_getDefaultSourceModel());
            
}
            $this
->_source Mage::getModel($this->getSourceModel())
                ->
setAttribute($this);
        
}
        
return $this->_source;
    
}

This is line 351 out of that section of code:

->setAttribute($this);

I honestly dont know what to do with this, if anybody could offer any suggestions it would be greatly appreciated.

Thanks, Ash.

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

I have just tried a few more things to get this working, including copying the 1.8 version to the 2 version, this had no success.
I also tried redownloading the file and using the extracted file, once again with no success.

 
Magento Community Magento Community
Magento Community
Magento Community
 
harry12bar
Sr. Member
 
Avatar
Total Posts:  168
Joined:  2008-01-07
 

HI, re-index your search in cache management. in your admin. Solved problem for me.
Happy new year!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Olof
Sr. Member
 
Total Posts:  152
Joined:  2008-10-17
 

The Rebuild Search Index button available in cache options produces the following error:

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

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

We are getting the same rebuild error. What browser were you using when the reindex worked? I have tried safari and firefox on a mac. Haven’t tried any windows browsers yet.

I have noticed that there is a lot of functionality that doesn’t work on the mac, but does in IE on PC, so maybe that is true in this case. I will try it later on today and see if it works, but hopefully a resolution may be posted before then as I hate using the PC side of my mac.

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

Hey harry12bar.  Thanks for the advice, but my first post states that is what is having the error.

I have noticed this is something specifically to do with my existing MySQL database.  I tried Firefox and Internet explorer and no luck what so ever.

I have since started the website completely from scratch again, as I dont have the time to wait for this to be fixed, and I was having a couple of other problems with my previous installation.  Only problem I am experiencing with my new database and new installation is the calendar to select date does not pop-up in design, not sure if that happens anywhere else.

I wish everyone the best of luck with this, luckily I was not very far in (4 weeks solid work give or take).

 
Magento Community Magento Community
Magento Community
Magento Community
 
Danielc1234
Sr. Member
 
Avatar
Total Posts:  175
Joined:  2008-01-09
Miami, FL - United States
 

Olof, I am getting the exact same error. All of my search is not working at all. This is a big problem because I have noticed that there are a lot of people trying to use our search function…
Any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jensta02
Jr. Member
 
Total Posts:  15
Joined:  2008-04-12
 

I was experiencing the same problem both on a fresh installation and an upgrade.

I went into Cache Management / Search Index Rebuild.

Fixed it up in both cases.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Danielc1234
Sr. Member
 
Avatar
Total Posts:  175
Joined:  2008-01-09
Miami, FL - United States
 

I tried that as well, but got this error..same as above. app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php on line 351
Has anyone got a fix on this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
winterradio
Sr. Member
 
Total Posts:  84
Joined:  2008-02-01
 

I’m getting a blank page when trying to rebuild the search index as well.  I suspect it’s related to the same error mentioned in this post.  I do not think it is permissions or cache related.  This is the last problem I need to iron out before I have 1.2.0.1 working, this upgrade has been a bear.

Hoping someone comes up with a solution, searching a website is pretty convenient.

 
Magento Community Magento Community
Magento Community
Magento Community
 
d3signr
Jr. Member
 
Total Posts:  9
Joined:  2008-05-21
 

Same issue for me. Fatal error: Call to a member function setAttribute(). Tried deleting cache, changing permissions, pulling hard at my hair… nothing seems to work

 
Magento Community Magento Community
Magento Community
Magento Community
 
advocat
Sr. Member
 
Avatar
Total Posts:  99
Joined:  2008-01-03
UA Kyiv
 

This issue reproduce only if used multiselect attributes for simple search
For quick fix - disable “Use in search” in Manage Product Attributes for multiselect attributes

 
Magento Community Magento Community
Magento Community
Magento Community
 
BobC
Jr. Member
 
Total Posts:  5
Joined:  2008-11-14
 

Advocat,
you made my day. Thx a lot.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jacobs_ny
Jr. Member
 
Total Posts:  13
Joined:  2008-11-30
 

I am having the same problem.. I went back and deleted attributes since having this problem.. The Rebuild conitinues to fail..

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nexus Rex
Sr. Member
 
Avatar
Total Posts:  139
Joined:  2008-07-10
Utah, USA
 

I have this issue as well. It also stops some of my products from saving… giving the exact same error.

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

Thankfully Advocat’s solution worked for me, even on the new installation this problem occured.

All I can say is this issue is on the roadmap, and has been assigned to someone, it has not yet been fixed though according to that. smile

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