Closed nilshoerrmann closed 2 months ago
Okay, this actually makes the plugin think it needs to create the modules
folder even if it's already there because $page->find('modules')
won't ever return any results. So this needs a different solution.
This is the new dialog implementation in the core: https://github.com/getkirby/kirby/blob/main/config/areas/site/dialogs.php#L379
I had a look at the updated core code and I'm not sure if/how we can fix this. Personally I don't mind the delete confirmation too much.
Personally, I can live with delete confirmations as well – but my guess is that clients will be surprised when they don't actually know about their modules being subpages.
My guess is that this can only be solved nicely when the core switches to hasChildren()
again (a method which is used in other places across the dialogs, so I guess this is more of an oversight).
I agree. They'd probably have to switch to $page->hasChildren() || $page->hasDrafts()
.
I'll close this for now because it's not under my control.
On Kirby 3.7, the parent page model needs to be adjusted to skip the subpage delete confirmation because the new dialog implementation does no longer use
hasChildren
to check for existing children (not sure why). Updating thechildren
method does the trick:I'm not sure if this will have any undesired side effects though.