getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.29k stars 168 forks source link

[v4] Page creation with custom models is not possible #5718

Closed modufolio closed 1 year ago

modufolio commented 1 year ago

Description

In my setup i've a Photography model that has Album model as child.

With 4.0.0-beta.1, I can't create a new album anymore.

I'm getting the following error:

Kirby\Cms\Page::createChild(): Return value must be of type PhotographyPage, AlbumPage returned

To reproduce

  1. clone https://github.com/modufolio/Kirby-Appkit
  2. create a new album page
modufolio commented 1 year ago

https://github.com/modufolio/Kirby-Appkit/issues/6

distantnative commented 1 year ago

Please try beta.2 - this should be fixed