I got a small code for a hook. But I got two problems, I’m not sure if I should use :before or :after and also my code isn’t working when I try to save the user within. Anybody the missing hint?
For example, when I change the text in a field and hit save, the new content isn’t saved … it reverts in the same second to the old value. But the hook is fired and the structure field gets filled.
No, they don’t fire at the same time. You can use the before hook to modify the results that are saved but you cannot use it to store something in the file system (so you should in any case remove your before hook if it is still there).
Good to know … I’ve tested my code on another installation and it’s working there, really strange! Now I have updated the Kirby core and it’s running well. Maybe there was an error or similar during uploading to the server where creates this bug. Thanks for help