Closed texnixe closed 3 years ago
Affected lines:
To be honest I don't understand that if
.
The line is there to hide the template select field if only one template option is available anyways (except when in debug mode, then always show the field).
But sounds like something in the logic of assigning what the one-and-only available value should be is off.
OK, yeah, that makes sense.
Then the issue is in this line:
There should be logic here to use the configured template if there was no template
field in the form. Probably it's enough to just have a fallback to the first available template if get('template')
is empty. Then we don't need to duplicate the entire logic from the load
method.
BTW: Where do we validate that the get('template')
value is valid and allowed? Wouldn't it be possible at the moment to pass a completely different non-allowed template in the request?
✅
Describe the bug
If a section only allows one template and the
debug
option is set to false in config, the default template is used instead of the defined template in Kirby 3.6.0-alpha.4 , because$template
is then set to null indialogs.php
instead of being assigned the template name.To Reproduce
Steps to reproduce the behavior:
'debug' => false
in configphotography
ornotes
subpage.album
ornote
templates.Expected behavior
The defined blueprint should be used.
Kirby Version
3.6.0-alpha.4