Page template not registering properly in page.create dialog

I have a new site with a few different page templates, including “campaigns”, “teams”, and “stories”. I’ve created the blueprint for each under blueprints/pages/, such as the below:

# Blueprint for individual story pages

title: Story

icon: pen
image:
  query: page.heroImage.toFile
  cover: true
  back: none

status:
  extends: meta/status
  unlisted:
    text: "The story is live, but not listed on the Stories page"
  listed:
    text: "The page is live and listed on the Stories page"

options:
  changeTemplate: false

tabs:
# Content tab
  content: tabs/story/story-content

# SEO + metadata tab
  seo:
    extends: tabs/page/page-seo

I also have custom panel areas for each page type to display each (using the kirby-blueprint-areas plugin). On each of those panel areas, I have a panel view button that creates a new page of that template:

# Blueprint for Stories panel area

title: Stories
icon: pen

buttons:
  pages.create: # Adds a new "Add Page" button
    icon: plus
    text: "New Story"
    dialog: 'pages/create?parent=/pages/stories&template=story'
    theme: blue-icon

# ...

For some reason, when using this button, certain panel areas do not assign the proper template (in this case, should be the story template). Rather, the Template picker from the dialog defaults to a null template:

Curiously, for other templates, this behavior works just as intended:

I’ve checked everything, including:

  • The page type blueprint is named + formatted correctly
  • The panel area blueprint, including the view button as shown above, is formatted correctly
  • The parent page for the respective page type exists and is published
  • Just about everything else I can think of

Is there any reason a specific page template wouldn’t be registering during this page creation process, but others do? Am I missing something obvious? Is my mind a mushy pile of mush from troubleshooting this for the past 3 hours?

I have answers to only one of those questions. Any help would be incredibly appreciated. :victory_hand:

[Also pinging @grommasdietz if this is something you’ve ever experienced with the blueprint areas plugin, or would have insight on]

Okay, weirdly got this to work by changing the page template of the parent page to stories instead of default (my standard page type). I wasn’t planning necessarily on having separate templates for these parent pages, but it doesn’t hurt me to make one (it’ll basically just be a clone of default).

No clue why it worked though — anyone with thoughts or ideas to add here is welcome.

Is this issue scoped to custom blueprint areas only or does it happen on a regular page view as well?

Great question. I’m seeing this happen on standard pages too — if I apply the same button to a page template, for stories it still gives me a blank template select field in the dialog when I click it (and story is not an option in that dropdown at all). But for teams, for example, it works as intended.

Here’s the button definition for if I want to create a new story (putting this in my basic default page blueprint just for testing purposes):

buttons:
  pages.create: # Adds a new "Add Page" button
    icon: plus
    text: "New Story"
    dialog: 'pages/create?parent=/pages/stories&template=story'
    theme: blue-icon

And here’s how the dialog displays:

Yet just changing that same code to the below for a new team:

buttons:
  pages.create: # Adds a new "Add Page" button
    icon: plus
    text: "New Team"
    dialog: 'pages/create?parent=/pages/teams&template=team'
    theme: blue-icon

Gives me the desired dialog:

No idea what’s going on there or why there’s such a clear difference between the terms, everything else being seemingly equal.

Hmm, since this does not seem to be related to the blueprint areas plugin by now, I can not really help. As soon as you can narrow it down and there is any relation differing in the plugin I can have a closer look and provide a potential solution.