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.
This commit is contained in:
parent
f7c119e48c
commit
4c321341d4
@ -77,6 +77,10 @@ if (($action == 'set') && !empty($id)) {
|
|||||||
if ($tablename == 'websitepage') $tablename = 'website_page';
|
if ($tablename == 'websitepage') $tablename = 'website_page';
|
||||||
|
|
||||||
$format = 'int';
|
$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);
|
$object->setValueFrom($field, $value, $tablename, $id, $format, '', $user, $triggerkey);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user