Skip to content

Creation of subpages fails in certain model constellations #7084

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
twiro opened this issue Mar 21, 2025 · 1 comment · Fixed by #7091
Closed

Creation of subpages fails in certain model constellations #7084

twiro opened this issue Mar 21, 2025 · 1 comment · Fixed by #7091
Assignees
Milestone

Comments

@twiro
Copy link

twiro commented Mar 21, 2025

I'm currently working on a new website that was running just fine on 5.0.0-beta.3 in the last weeks and the client had no problems entering and structuring their content in the panel.

After the recent update to 5.0.0-beta.4 we face some heavy issues in the panel that makes working on the content nearly impossible right now – the main problem that struck first was that creating new pages failed in most cases and it took me quite some time to understand which cases actually were affected. I tried my best to track it down and this is what seems to happen:

Description

Trying to create a new subpage under the following conditions fails and throws the type of errors listed below:

Conditions:

  1. A default page model is used
  2. The template of the parent page has its own page model
  3. The template of the subpage has no own page model

Errors:

  • Kirby\Cms\Page::model(): Return value must be of type ProjectPage, DefaultPage returned
  • Kirby\Cms\Page::model(): Return value must be of type ArticlePage, DefaultPage returned
  • Kirby\Cms\Page::model(): Return value must be of type ProfilePage, DefaultPage returned

Workaround:

As soon as not alle three conditions are met at the same time, creating subpages works again.

Screenshot

Image

Your setup

Kirby Version: 5.0.0-beta.4

@distantnative distantnative added this to the 5.0.0-rc.1 milestone Mar 21, 2025
@distantnative
Copy link
Member

Can reproduce it and already have an idea where the regression occurred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants