This is my approach to fix the problem described here: #7227
This patch also avoids the problem with not valid templates from this pull request: #7228
This PR will only load a template if it is a valid template (-> it exists and is enabled) else the specified template is loaded.
How to test
1.) Add ?template= and then ?template=xyz (not valid template name) to the end of the frontpage (this should load the default Beez3 template, IMHO not a good fallback solution...)
2.) Deactivate the template Beez3 (Extensions - Extensions - Manage - Status) and try it again, both tries will result in an error message on blank page
3.) Apply this PR (with Patchtester component) and try it again. The correct (selected) template will be loaded on both tries!
test
works as described for both '?template=' and for a non-existant template.
and: with and without the template unabled
Thanks