New pages always being created as default.txt

I seem to have a problem where new pages created from the panel are always named default.txt. This is obviously a problem because that means they always use the default template/blueprint.

For example:

  • newpage.yml is in site/blueprints/pages
  • newpage.php is in site/templates
  • When I create a new page from the panel, I choose ‘new page’ from the template selection dropdown
  • The new page is created as default.txt anyway

Why is the system ignoring my template preference when creating the new page? I know my newpage.yml and newpage.php are correct because when I manually rename default.txt to newpage.txt everything works as intended.

Forcing child pages to use a specific template by specifying it in the parent blueprint works fine. However choosing a template from the drop-down menu seems to be broken for me.

The above settings should create a file called ‘error.txt’, but it creates ‘default.txt’ instead. I have multiple templates and no matter which one I choose the system always creates ‘default.txt’.

Any help is greatly appreciated!

I’ve done more testing.

It appears that Kirby is working fine – the real issue is that the template dropdown is broken in Microsoft Edge.

If I use the template dropdown in other browsers, the correct template is used to create the new page. If I use the template dropdown in Edge, it will always select the FIRST option, regardless of what the user has chosen.

Seems to be some kind of weird UI issue.

Maybe this is somewhat related:

Yes, I posted that on github after I found out what the problem was. :blush:

I know, that’s why I posted it here for reference, so that other people who run into this know that there is already an issue on GitHub.

1 Like

Hello, I’m new here and wanted to try Kirby 3, but there is a problem.

I can’t chose between different templates while creating a new page in the panel. So it always creates a “default.txt”-file. If I rename the “default.txt” in my folder it’s disappearing in my panel. If I rename it again to “default.txt” it’ll be shown in the panel again. When I look on my site the page-link in the menu is always there. Only the panel doesn’t want to show the new pages when I rename the “default.txt” in my folder…

I’m using Mac Mojave + MAMP + the Kirby Starterkit-master and tried it with safari and firefox.

Can anybody help?

Hey, @Isabelle,

welcome to the Kirby forum.

In the Starterkit’s /site/blueprints/site.yml file, the pages section limits what templates it shows and what can be created:

# The site blueprint must have a title, the title may be different from the file name
# The `site.yml` blueprint defines the look of the start page (Dashboard) of the Panel.
title: Site

# The site blueprint usually provides easy access to all main pages of the site.
# In this example blueprint, we also show subpages of the `photography` and `notes` pages.
# More about the site blueprint:

# The layout of this form has two columns:
  # The first column has one section for the subpages of the `photography` page in card layout
  # It reuses the pages section defined in `/site/blueprints/sections/albums.yml`
  - width: 1/2
      albums: sections/albums

  # The second column has two sections, `notes` and `pages`
  - width: 1/2
      # The `notes` section reuses the pages section defined in `/site/blueprints/sections/notes.yml`
      notes: sections/notes

      # The `pages` pages section shows other main pages of the site
      # Using the `templates` option, we limit which types of pages are shown
      # Using the `create` option, we limit the type of page that can be created when a new page is created
      # Note that the `sandbox` page and the `error` page that also exist in the content folder but use different blueprints thus do not show up in the list
      # Since the error page's blueprint is set to `read: false`, it wouldn't show up here even if you added the error blueprint to the templates list
        type: pages
        create: default
          - about
          - home
          - default

(Comments are not in the Starterkit, it’s a copy of an annotated version I created recently)

So to allow creating pages with something else then the default templates, you can pass multiple blueprints to the create property:

        type: pages
          - default
          - whatever
          - about
          - home
          - default
1 Like

Hello texnixe, thank you very much!

It’s working perfectly now :relaxed:

1 Like

The issue was fixed in 3.2.4.