Fix: Ajax on/off not saving value in DB after updating to version >=12
The issue seams to be that starting in version 12 the "[element]_UPDATE" trigger is called in file core/ajax/objectonoff.php but some properties that are required on $object are not set. Those are (at least for product that is what I use): $object->id $object->table_element $object->fields[$field] The error occurs on the setValueFrom function in core/class/commonobject.class.php file
This commit is contained in:
parent
3b49792985
commit
a683acde62
@ -78,5 +78,9 @@ if (($action == 'set') && !empty($id)) {
|
||||
|
||||
$format = 'int';
|
||||
|
||||
$object->table_element = $tablename;
|
||||
$object->id = $id;
|
||||
$object->fields[$field] = array('type' => $format, 'enabled' => 1);
|
||||
|
||||
$object->setValueFrom($field, $value, $tablename, $id, $format, '', $user, $triggerkey);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user