diff --git a/src/Panel/PageCreateDialog.php b/src/Panel/PageCreateDialog.php index 2ab9c5863c..41c13a2bd8 100644 --- a/src/Panel/PageCreateDialog.php +++ b/src/Panel/PageCreateDialog.php @@ -248,7 +248,7 @@ public function load(): array public function model(): Page { return $this->model ??= Page::factory([ - 'slug' => 'new', + 'slug' => '__new__', 'template' => $this->template, 'model' => $this->template, 'parent' => $this->parent instanceof Page ? $this->parent : null @@ -266,12 +266,7 @@ public function resolveFieldTemplates(array $input): array // create temporary page object // to resolve the template strings - $page = new Page([ - 'slug' => 'tmp', - 'template' => $this->template, - 'parent' => $this->model(), - 'content' => $input - ]); + $page = $this->model()->clone(['content' => $input]); if (is_string($title)) { $input['title'] = $page->toSafeString($title);