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?
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:
'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.
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
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?
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
// CMS settings
label: Link zum Veranstalter
Do you get the wrong blueprint in the panel or the wrong template when the page is rendered?
Wrong blueprint and wrong template.
And the strange thing is, that it works with the other pages.
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.
Never mind, Andreas, I only saw that on second sight as well.
Enjoy the break