Recently we have upgraded the suitecrm version from 7.10.x to 7.13.0. There a few fields in modules which have default values .When saving a record , there is an error at filed level saying Invalid value. This is happening for standard functinality too. The same error is showing for the listview items per page in System settings and even in studio also.Please refere to the attached screenshot for the reference.
suitecrm version : 7.13.0
PHP version : 8.0
Apache server.
Note: No fatal errors showing up in the PHP error logs and suitecrm logs
Hai @pgr , @rsp Thank you for the replies. @rsp , the issue you posted is not relevant to mine . In my case , this is happening for every module which have the default values defined for the fileds (enum,text,percentage) and not allowing the record to save, and displaying the filed error as ‘Invalid value’. I am clueless why this is happening.
7.14 version studio works fine when there is an integer field with a default value. There are no error when the default , min , max values are set for the field in the studio, the field definition gets saved.
But the default values are not displayed in edit mode and not saved in the database when the field left blank while saving the record.
I made the following code in include/EditView/EditView2.php, the field shows the default value when the user value is empty while creating new record or editing the existing one.
foreach ($this->fieldDefs as $name => $defs) {
if (empty($this->fieldDefs[$name]['value']) && !empty($defs['default'])) {
$this->fieldDefs[$name]['value'] = $defs['default'];
}
}