Kirby 3 hooks won't work

I’m upgrading from K2 to K3 and I’m having some issues with hooks. I’m using the new syntax and brought them to the config.php file (they were in a plugin file in K2), but there is no way to make them work. I got no errors but they just won’t work.

What should I check?
Thank you in advance

Could you please post your config.php file?

Maybe you’re using more than one return array in your config.php? Have seen that multiple times now…

yes, more than one return array!
God bless you @texnixe!

But… On Kirby2 I was used to put the hooks code inside a plugin. Do I really need to put hooks in the config file or the plugin way still works?

Both ways work.


I’ve added a warning re. multiple returns in the docs now…