Null field on studio

Does anyone know what is happening?

I noticed a error on saving and appeared 3 null, i went to the studio and on the fields of accounts appears me 3 nulls also:

[ATTACH]10404[/ATTACH]

Thank you in advance,

SpockPT

(from SpockPT)
Parents
  • check the DB table fields_meta_data and the directory custom/Extension/modules//Ext/Vardefs/  If there are files in the latter that resemble: sugarfield__c.php, that are not represented in the former, then removing them should clear up the issue.  (from pmcqueen)
  • As a follow-up - here's how I got around the issue, then fixed it.    I ran a backtrace (PHP: debug_print_backtrace) and worked my way back through the stack to the UpdateSQL call on the DBManager class (/include/database/DBManager.php). Around line 1950 - just before the branching if that adds items to the columns array ($columns[] = ...) I added the following:  [code]  if (trim($fieldDef['name']) == '') {   // Null fields in Studio - shouldn't happen, but they do   error_log('Skipping field as it has no name. Field def follows:\n'.print_r($fieldDef,true));   continue;  }  [/code]  This gave me an output to the PHP error log (yes, I could have used the sugar log, but the error log is less cluttered on my system!) of the field definition, which contained a lot of information about the field, but no name. I then recognised it as a custom field that for some reason hadn't been added properly. Thankfully, I have since discovered I can do without it, and have commented out the /custom/ references to it.    Hope this saves someone the hour it took me..!  (from almcnicoll)
Reply
  • As a follow-up - here's how I got around the issue, then fixed it.    I ran a backtrace (PHP: debug_print_backtrace) and worked my way back through the stack to the UpdateSQL call on the DBManager class (/include/database/DBManager.php). Around line 1950 - just before the branching if that adds items to the columns array ($columns[] = ...) I added the following:  [code]  if (trim($fieldDef['name']) == '') {   // Null fields in Studio - shouldn't happen, but they do   error_log('Skipping field as it has no name. Field def follows:\n'.print_r($fieldDef,true));   continue;  }  [/code]  This gave me an output to the PHP error log (yes, I could have used the sugar log, but the error log is less cluttered on my system!) of the field definition, which contained a lot of information about the field, but no name. I then recognised it as a custom field that for some reason hadn't been added properly. Thankfully, I have since discovered I can do without it, and have commented out the /custom/ references to it.    Hope this saves someone the hour it took me..!  (from almcnicoll)
Children
No Data