Once I update a page it does not work. The function does not seem to be called. To debug it, I tried to use all different kind of variations for the hook name (like panel.page.* and * but they all don’t seem to work.
When I look at the source code and the commits, I see that the handling of hooks seemed to have changed in 2.4.0 (I’m using 2.4.1). This seemed to have caused problems before: panel.page.sort not firing as expected.
When I look into app/src/panel/models/page.php I see the different that in line 429 still the trigger( $event ) syntax is used. Is that correct? In line 271 (in move) the function is used like this:
Regarding the syntax I don’t see any difference? Even if this use(&$triggered) is there, it’s just PHP syntax and should not affect the execution of the hook.
I’ve seen that the hooks don’t return anything, but when I turn on error reporting and look into the log file, this errors should be reported anyway, right?
As far as I know, we haven’t had this issue before and I have no idea what could be causing this. I assume it it’s rather a server issue than related to Kirby. Does it work locally? Can you test with another server?
Just for future reference: somehow all my debugging attempts seem to be misleading. I can confirm that the hooks work as expected.
trigger_error does indeed not report anything inside hooks. f:write somehow only write partially to the file. Using file_put_contents directly make it possible for me to debug the hooks.
Just out of curiosity: why aren’t hooks reporting errors? This makes it especially hard to debug them.
Thank you @texnixe for your support and especially your patience!