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

How to fix this bug? 
 
mtuulu
Jr. Member
 
Total Posts:  1
Joined:  2012-06-27
 

An error occurred while saving this configuration: Notice: Trying to get property of non-object in /var/www/sedeveloper/app/code/core/Mage/Adminhtml/Model/Config/Data.php on line 135

Getting this error everytime when I try to save advanced configurations from admin side

 
Magento Community Magento Community
Magento Community
Magento Community
 
kab8609
Enthusiast
 
Avatar
Total Posts:  821
Joined:  2009-04-07
Cleveland
 

Are you using any custom extensions?

Have you overwritten core code?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Handfeger
Jr. Member
 
Total Posts:  1
Joined:  2010-10-22
 

I think this is a Bug of 1.7.0.2! Made a clean install and still got this bug (in Development Mode).

Replacing line 135 of /app/code/core/Mage/Adminhtml/Model/Config/Data.php with the following did the job for me.

$backendClass = @$fieldConfig->backend_model;

This is not a clean solution but I hope this will be overwritten with the next Magento Update.

 
Magento Community Magento Community
Magento Community
Magento Community
 
markoshust
Sr. Member
 
Avatar
Total Posts:  129
Joined:  2007-09-05
Cleveland, OH
 

Suppressing an error is sortof a ‘hack’… works fine in this scenario, but you are better of explicitly checking for set variables. Here’s a quick patch for this I whipped together.

diff --git a/app/code/core/Mage/Adminhtml/Model/Config/Data.php b/app/code/core/Mage/Adminhtml/Model/Config/Data.php
index 749ee52
..b164eb9 100644
--- a/app/code/core/Mage/Adminhtml/Model/Config/Data.php
+++ b/app/code/core/Mage/Adminhtml/Model/Config/Data.php
@@ -132,+132,10 @@ class Mage_Adminhtml_Model_Config_Data extends Varien_Object
                 
/** 
                  * Get field backend model
                  */  
-                $backendClass $fieldConfig->backend_model;
-                if (!
$backendClass{
+                if (isset($fieldConfig->backend_model)) {
+                    $backendClass $fieldConfig->backend_model;
+                
}
+                if (!isset($backendClass)) {
                     $backendClass 
'core/config_data';
                 
}
File Attachments
Mage_Adminhtml_Model_Config_Data.txt  (File Size: 1KB - Downloads: 388)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Flaxton
Sr. Member
 
Avatar
Total Posts:  137
Joined:  2010-06-03
Houston
 
markoshust - 13 July 2012 08:01 AM

Suppressing an error is sortof a ‘hack’… works fine in this scenario, but you are better of explicitly checking for set variables. Here’s a quick patch for this I whipped together.

At the risk of sounding stupid… where exactly do we run this “patch"… Is this an SQL query, do we do this via SSH, do we put this code into our template somewhere? Well… it obviously is an SSH command, but I might need a little direction here.

 
Magento Community Magento Community
Magento Community
Magento Community
 
markoshust
Sr. Member
 
Avatar
Total Posts:  129
Joined:  2007-09-05
Cleveland, OH
 

applying magento patches

 
Magento Community Magento Community
Magento Community
Magento Community
 
Flaxton
Sr. Member
 
Avatar
Total Posts:  137
Joined:  2010-06-03
Houston
 
markoshust - 03 August 2012 05:11 AM

applying magento patches

I like to do that to people I know more than too. It makes me feel better about myself, and clever.

Hey Mark, jk.

In all honesty I appreciate your dedication to Magento, and for little things like this. See you on the twitter.

 
Magento Community Magento Community
Magento Community
Magento Community
 
markoshust
Sr. Member
 
Avatar
Total Posts:  129
Joined:  2007-09-05
Cleveland, OH
 

Just saying… before I ask any question, to anyone else or any forum, I check google first. It’s respectful to other’s time and it’s very easy to do. And you might actually learn how to figure other things out as well. Google is a wonderful thing.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Flaxton
Sr. Member
 
Avatar
Total Posts:  137
Joined:  2010-06-03
Houston
 

Well of course. Google also got me here. I know how to use it, it is swell. In all honesty, I wasn\’t even sure what to Google or I would not have asked the question. People us terms like \"patch\" or \"fix\" very arbitrarily. Sometimes things might seem very apparent to you because you are in the know. Yet, to those of us who are learning things, sometimes phrases get thrown around that seem vague and overused. I have \"patched\" Magento multiple times, not once have I used your method.

For instance, when you actually Google the term you did instead of taking the first result-- there are multiple explanations of how to patch Magento. None of the other top three result uses your method. Just saying…

Thanks for the help!

 
Magento Community Magento Community
Magento Community
Magento Community
 
benz001
Sr. Member
 
Avatar
Total Posts:  238
Joined:  2009-02-05
Sydney
 

Please see this bug report and vote it up by adding a “me too” comment to the bug report - this seems to be a bug that’s been around since 1.7.0.1 was released:
http://www.magentocommerce.com/bug-tracking/issue/?issue=13819

Also cross linking to this discussion thread: http://www.magentocommerce.com/boards/viewthread/285220/

 
Magento Community Magento Community
Magento Community
Magento Community
 
benz001
Sr. Member
 
Avatar
Total Posts:  238
Joined:  2009-02-05
Sydney
 

WARNING: Applying the patch I’ve described above does create a problem on 1.7.0.2, you’ll no longer be able to save PayPal settings in the Payment methods configuration.

So far I’ve not found a fix that addresses both problems.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kalenjordan
Sr. Member
 
Avatar
Total Posts:  218
Joined:  2011-10-31
Pasadena, CA
 

Hey @benz001, I think this is the accepted bug report for the issue.
http://www.magentocommerce.com/bug-tracking/issue?issue=14217

There’s one other line that you’ll need to resolve the paypal settings issue - it has to do with the way that encrypted backend config models work:

unset($backendClass);
                if (isset(
$fieldConfig->backend_model)) {
                    $backendClass 
$fieldConfig->backend_model;
                
}
                
if (!isset($backendClass)) {
                    $backendClass 
'core/config_data';
                
}

It’s the unset line.

Nice work on this, @Mark!  Saved me some hunting around just now for sure!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
inder9999
Jr. Member
 
Total Posts:  6
Joined:  2013-06-24
 
Handfeger - 11 July 2012 02:53 AM

Thanks friend you solved my problem with our solution thanks very much.

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