Change Slug Before Hook - avoid error message by returning a modified Slug

https://forum.getkirby.com/t/cancel-adding-a-page-in-pagemodel-hookpagecreate/16691?u=konstantin_kraska

Okay Sorry, but I’m still working on a solution.

I want to avoid the error message in the add dialog.

My question is: When is the check done if the slug for creating a page exists.

Is it possible to run a hook / function before the error message is triggered.

I already tried to modify the parent page create method and the page is saved with a suffixed slug, but the error message in the add dialog remains.

Any ideas or hints how to solve this?

This should solve your problem: