Try the Demo

Magento Forum

   
Fatal error: Call to a member function getSource() on a non-object In products
 
DaymoH
Sr. Member
 
Total Posts:  96
Joined:  2008-09-18
 

when I click on a product to open it up I am getting the following error

Fatal errorCall to a member function getSource() on a non-object in /home/public_html/app/code/core/Mage/Catalog/Model/Product.php on line 1150

Any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
paul_smit
Jr. Member
 
Total Posts:  22
Joined:  2010-02-02
 

any updates on this? I have this when using the search function.

Thanks Paul

 
Magento Community Magento Community
Magento Community
Magento Community
 
ABTOMAT
Jr. Member
 
Total Posts:  5
Joined:  2009-12-18
 

Me too. Since I’ve updated to Magento 1.4 and changed design to my own (that worked with an elder version)
Trying to do something, does anyone know how to solve this problem?
Also search doesn’t work. Even if I change design to default and try to look for products that were added after upgrade.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ABTOMAT
Jr. Member
 
Total Posts:  5
Joined:  2009-12-18
 

So, trouble was resolved. When you’re trying to get access to attribute of product that doesn’t exist, system crashes. AFAIK, in elder versions system was just ignoring such inqueries.
Try to check your design phtmls for such things.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Mentor
 
Avatar
Total Posts:  1688
Joined:  2009-06-23
 

Hi
I am also getting the same error in product details page after upgrading magento 1.4.1.1 to 1.5.0.1

Let me know anyone has fixed such issue.

Thanks

 Signature 

MagePsycho - Magento Freelancer
Free Modules: jQuery LightBoxes | Frontend Links Manager & more…
Commercial Modules: jQuery Sliders Pro | Custom Login Redirect Pro | Store Restrction Pro & more...

Follow me on Twitter @ magepsycho

 
Magento Community Magento Community
Magento Community
Magento Community
 
kuzyakiev
Jr. Member
 
Total Posts:  18
Joined:  2008-10-08
 

As say ABTOMAT When you’re trying to get access to attribute of product that doesn’t exist

>Let me know anyone has fixed such issue.
You may fix it by overridind the function

public function getAttributeText($attributeCode)
    
{
        
return $this->getResource()
            ->
getAttribute($attributeCode)
                ->
getSource()
                    ->
getOptionText($this->getData($attributeCode));
    
}

for something like

public function getAttributeText($attributeCode)
    
{
        
if ($attribute $this->getResource()->getAttribute($attributeCode)) {
            
return
                    
$attribute->getSource()
                                ->
getOptionText($this->getData($attributeCode));
        
else {
            
//Mage::log(\'attributes-errors.log\',$attributeCode);
            
return false
        
}
    }

of class Mage_Catalog_Model_Product

 
Magento Community Magento Community
Magento Community
Magento Community
 
rodrigofox
Jr. Member
 
Total Posts:  5
Joined:  2011-05-25
 
kuzyakiev - 02 April 2011 10:01 AM

As say ABTOMAT When you’re trying to get access to attribute of product that doesn’t exist

>Let me know anyone has fixed such issue.
You may fix it by overridind the function

public function getAttributeText($attributeCode)
    
{
        
return $this->getResource()
            ->
getAttribute($attributeCode)
                ->
getSource()
                    ->
getOptionText($this->getData($attributeCode));
    
}

for something like

public function getAttributeText($attributeCode)
    
{
        
if ($attribute $this->getResource()->getAttribute($attributeCode)) {
            
return
                    
$attribute->getSource()
                                ->
getOptionText($this->getData($attributeCode));
        
else {
            
//Mage::log(\'attributes-errors.log\',$attributeCode);
            
return false
        
}
    }


of class Mage_Catalog_Model_Product

Great!!! I got time to work with your information! Thanks!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
kuzyakiev
Jr. Member
 
Total Posts:  18
Joined:  2008-10-08
 
rodrigofox - 15 February 2012 04:37 AM

Great!!! I got time to work with your information! Thanks!!!

You are wellcome! =)

 
Magento Community Magento Community
Magento Community
Magento Community
 
developerindia
Member
 
Total Posts:  57
Joined:  2009-06-25
 

Thanks “kuzyakiev” its work for me also.

 Signature 

Web Development | Web Developer | Magento Development | PSD To Magento

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top