Is this the right place to ask for help?
Kirby CMS Bug Report: Template Field Stripped from Content Data
Summary
Critical Issue: The template
field is completely removed from content data during Kirby’s content parsing process, rendering the custom template system non-functional.
Environment
- Kirby Version: 4.8.0
- PHP Version: 8.3.21
- Server: Laravel Herd (local development)
- Theme: Zero One theme
- Plugins: zohner-arts custom plugin
- Setup: Multi-language (en, de, it)
Expected Behavior
When a content file contains:
Title: About
----
Template: about
----
Status: listed
----
Text: Content here
The template field should be:
- Available in
$page->content()->data()
- Accessible via
$page->content()->get('template')
- Used for template resolution by Kirby core
Actual Behavior
- Template field is completely missing from parsed content data
$page->content()->has('template')
returnsfalse
$page->content()->get('template')
returns empty string- All pages default to ‘default’ template regardless of content file declarations
$page->intendedTemplate()
returns ‘default’ instead of specified template
Reproduction Steps
- Create content file with explicit
Template: [name]
field - Parse content using
$page->content()->data()
- Observe that template field is missing from returned array
- Check
$page->content()->has('template')
- returns false - Verify file contains template field with
file_get_contents()
Diagnostic Evidence
Raw File Content
Title: About
----
Template: about
----
Status: listed
----
Text: About page content
Parsed Content Data
// $page->content()->data() returns:
[
'title' => 'About',
'status' => 'listed',
'text' => 'About page content',
'uuid' => '[uuid-string]'
// 'template' => MISSING!
]
Template Resolution Failure
$page->content()->get('template'); // Returns: ""
$page->content()->has('template'); // Returns: false
$page->intendedTemplate(); // Returns: "default"
$page->template(); // Returns: "default"
Impact Assessment
Critical Severity - This bug breaks core Kirby functionality:
- Custom templates unusable - All pages fall back to default template
- Panel interface broken - Custom blueprints not loaded
- Plugin templates ignored - Registered templates never used
- Development workflow disrupted - Template system non-functional
Troubleshooting Attempted
Configuration Checks
Template files exist in correct locations
Blueprint files properly configured
Plugin registration verified
File permissions correct
No conflicting site templates
Technical Attempts
Forcing template via hooks (
page.render:before
)Route-based template override
Explicit blueprint declaration in content
Multiple cache clears and server restarts
Removing all conflicting files
Multi-language Verification
Template field present in ALL language files
Same issue occurs with languages disabled
Problem persists with single-language test
Potential Root Cause
The template field appears to be filtered out during content parsing, possibly due to:
- Reserved field name conflict in Kirby 4.8.0
- Theme/plugin interference with content loading
- Multi-language content processing bug
- Core regression in content field parsing
Workaround Status
No viable workaround found. Attempted solutions:
- Custom field names (e.g.,
Pagetype: about
) - Hook-based template forcing
- Route-based template selection
All workarounds fail because the underlying content parsing system is affected.
Files for Investigation
/content/1_about/about.txt
- Contains template field/content/1_about/about.en.txt
- Language-specific file/site/config/config.php
- Site configuration/site/plugins/zero-one/
- Theme files/site/plugins/zohner-arts/
- Custom plugin
Request for Support
This appears to be a core Kirby regression that requires investigation by the development team. The template field parsing mechanism seems fundamentally broken in this configuration.
Priority: Critical - Core functionality non-operational Urgency: High - Blocks all development progress
Additional Information Available
- Complete diagnostic scripts and outputs
- Full site configuration files
- Step-by-step reproduction case
- Plugin and theme file structures
Please let us know what additional information would be helpful for debugging this critical issue.