I have read and read again the page https://bigprof.com/appgini/help/advanc ... ific-hooks.
I have modified my tablename.php file in the hook directory. You can see it here : https://github.com/chrisagon/hrcv3/blob ... t.php#L188
I have no error, but I don't understand why I don't even see the echo I have put for debugging purpose and why my code is not executed !?
What kind of tools do you use for debuging your php file ?
Anyboby have an idea ?
Table specific hook doesn't seem to work, help and tips for debuging
Re: Table specific hook doesn't seem to work, help and tips for debuging
Hi,
just put
exit;
after
like
Then you should see your text.
The hook file gets executed but will then return with true or false to indicate that the function terminated correctly or not (e.g. instert to be done or not).
Then the page gets reloaded, so that you will not see the output that you produce in the hook itself via echo.
You can e.g. use the "exit;" version, or write your output to a file.
just put
exit;
after
Code: Select all
echo "<br>apres INSERT Consultant </br>";
Code: Select all
echo "<br>apres INSERT Consultant </br>";exit;
The hook file gets executed but will then return with true or false to indicate that the function terminated correctly or not (e.g. instert to be done or not).
Then the page gets reloaded, so that you will not see the output that you produce in the hook itself via echo.
You can e.g. use the "exit;" version, or write your output to a file.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Table specific hook doesn't seem to work, help and tips for debuging
YES of course !
Thank you for your help.
Thank you for your help.
Chrisagon.
Re: Table specific hook doesn't seem to work, help and tips for debuging
here is an help for debugging.
You can use "error_log" : https://www.php.net/manual/fr/function.error-log
like this :
or like this :
This help me to find my bug.
You can use "error_log" : https://www.php.net/manual/fr/function.error-log
like this :
Code: Select all
// error message to be logged
$error_message = "Ceci est un message erreur!\r";
// path of the log file where errors need to be logged
$log_file = "./mes-erreurs.log";
// logging error message to given log file
error_log($error_message, 3, $log_file);
Code: Select all
$error_message = $chemin_cv." Fichier non trouve !";
error_log($error_message, 3, "./mes-erreurs.log");
Chrisagon.