Since version 2.3.0, Kirby only applies the default template

I’m trying to find the issue that causes my Kirby installation to only apply the default template (default.php) to all my pages that have individual and correct named templates.

This problem exists since version 2.3.0 and is also existent in the newest version 2.3.2. All pages and settings work smoothly to version 2.2.3 only.

Has anyone an idea what change could cause these issues and what adaptions I could try?

Thanks
René

Do you use any plugins? If so, try to disable them to see if the problem persists.

Do you use a multilang setup or is there only one language?

The issue persists when I disable my contactform plugin.

Yes, I plan to use multiple language in a future version and already prepared one default language:

c::set('languages', array(
  array(
    'code'    => 'de',
    'name'    => 'Deutsch',
    'default' => true,
    'locale'  => 'de_DE',
    'url'     => '/',
  )
));

Removing this configuration snippet solved this issue. Am I doing something wrong?

Thanks for your help.

Have you seen the warning about switching from single-language to multi-language on this docs page? You need to make sure to rename all your content files to include the language code.

No, I didn’t see it. It now works with the enabled language settings.

Thanks.

Hi!

How do you solved the problem? I copied the language settings into my config, but nothing happened.
(Edit: Not nothing, but only the default.yml will be used.)

Ich have a folder, a yml-file and a template file but only default.php will be loaded. But only for two pages. The other tree pages loading there own template.

Only one language, no multi-lang planned and no idea how I can solve this issue :sob:

Best,
Andreas

Why do you use language settings if you don’t need multiple languages? And if you have set the language in config.php, have you changed your text files to reflect that, i.e. added the language code to each text file?

I just tried the ”solution“. That’s all. No clever reason cause I’ve no idea.

Is there a way to force Kirby to take a template?

Andreas

To force a template, use the same filename for the template file as the content file, i.e. home.txt => home.php. The filenames must have the exact same spelling and do not use capital letters in filenames.

If you enable language settings, even if only for one language: home.de.txt => home.php

I know, I know. Look:

But I do not know what I did wrong :frowning:

title: Media

// CMS settings
pages: false
files: true
  fields:
    alttext:
      label: Alt-Text
      type: text

    caption:
      label: Caption
      type: text

    author:
      label: Author
      type: text

deletable: false
options:
  preview: false
  status: false
  //template: false
  url: false
  delete: false

// content
fields:
  title:
    label: Modulname
    type:  text
    required: true

  media_headline:
    label: Überschrift
    type:  text

  media_text:
    label: Inhalt
    type:  textarea

  media_item:
    label: Veröffentlichungen
    type: structure
    entry: >
      {{media_item_hl}}

    fields:
      media_item_hl:
        label: Überschrift
        type: text

      media_item_text:
        label: Text
        type: textarea

      media_item_image:
        label: Bild
        type: image

      media_item_url:
        label: Link zum Veranstalter
        type: url

Andreas

Do you get the wrong blueprint in the panel or the wrong template when the page is rendered?

Both :frowning:
Wrong blueprint and wrong template.
And the strange thing is, that it works with the other pages.

Regards
Andreas

Your text file does not have the same name as the template, it is called “4-media.txt” instead of “media.txt”. The same problem with 3-sport.txt.

How stupid am I?!
Thanks a lot for finding this stupid mistake of mine. I think it’s time to take a break from the machine and give my eyes a rest!

The reason: copy & paste to avoid typos. :laughing:

THANK YOU
Sonja

Never mind, Andreas, I only saw that on second sight as well.

Enjoy the break :slight_smile: