Throw new Exception() in hooks displays "Please fix all form errors…" message


When I use throw new Exception() in a hook, Kirby displays a pop-up with the message “Please fix all form errors…”

I can reproduce this issue in the starterkit (Kirby 3.2.5) by adding this in the config file:

return [

    'debug' => true,

    'hooks' => [
    	'page.update:after' => function ( $newPage , $oldPage ) {

    		throw new Exception('Page Updated');


Yes, I can reproduce that and got this rather useless message in another context the other day as well. Could you create an issue on GitHub, please?


1 Like

Ah, there was already an issue and has been fixed. So should be in 3.3.0.