hook insert before

prettem

Member
Hello dear forum, does anyone have advice on why a "hook insert before" is not working? I want to set a number to another table when creating a new record, but my hook function is not being called at all. Many thanks for any pointers. Best regards, Manuel.

$hooks['abwesenheit']['insert']['before'] = 'dadabik_meldung_vorgang_reservieren';

function dadabik_meldung_vorgang_reservieren($params){
global $conn, $dadabik_main_file, $table_name, $where_field, $where_value, $quote;

$vorgangsnummer = $params['vorgang'];
$sql = "UPDATE `einstellungen` SET `lfd_vorgangsnummer` = '$vorgangsnummer' WHERE `id` = 1";
$res_prepare_line3 = prepare_db($conn, $sql);
$res_line = execute_prepared_db($res_prepare_line3,0);
}



Your current DaDaBIK version​

You are using DaDaBIK version 11.10-Elba enterprise, installed on 02.09.2023 (installation code: 1907564f2723317ba7), the latest version of DaDaBIK is 11.10-Elba released on 13.07.2023

You are running the latest release of DaDaBIK

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.

System info​

PHP Version: 8.1.23

mysql version: 10.6.12-MariaDB-0ubuntu0.22.04.1

Web server: nginx/1.24.0

Client: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 OPR/95.0.0.0
 

eugenio

Administrator
Staff member
hello,
have you tried to add a debug

Code:
die('test');

statement as the first line of the function to check if it is called?
 

eugenio

Administrator
Staff member
var_dump($...) ? Could you paste the whole code of your function including the debug statement? Did the execution of the code interrupt with exit()?
 
Top