Description of the problem
On the Template settings screen, you can set a default 404 page template.
The initial list of templates is limited in number for performance reasons. But you can search all the templates to find the one you want to use.
However, if you try to choose a template that was NOT in the initial list, you are given a validation error and you cannot save your choice.
Therefore you can only currently set the 4040 template to something in the initial list of values, which is limiting.
There is a workaround: set it in config.php. But this is not a good longterm solution.
$config['site_404'] = 'search/404-page';
You can also change the name of the template to something alphabetically prioritized. Again, not a good longterm solution.
How To Reproduce
Steps to reproduce the behavior:
- Start with a site that has many templates.
- Go to the Template Settings screen.
- Use the search box on the 404 setting to choose a template that is NOT in the initial list
- When you select that template, you get the error message: "The option you selected is not valid." and you cannot save the settings
- See screenshot below.
Error Messages
The option you selected is not valid.
Screenshots / Videos / Template Code

Environment Details:
- Version: 7.5.8
- PHP Version
- MySQL Version
- OS:
- Web Server:
Possible Solution
The validation options appear to be set at load time. They should refresh when the search returns values.
Additional context
I would be curious if to see if this bug happens on any other places in the UI where an initial validation list of values is loaded.
Description of the problem
On the Template settings screen, you can set a default 404 page template.
The initial list of templates is limited in number for performance reasons. But you can search all the templates to find the one you want to use.
However, if you try to choose a template that was NOT in the initial list, you are given a validation error and you cannot save your choice.
Therefore you can only currently set the 4040 template to something in the initial list of values, which is limiting.
There is a workaround: set it in config.php. But this is not a good longterm solution.
$config['site_404'] = 'search/404-page';You can also change the name of the template to something alphabetically prioritized. Again, not a good longterm solution.
How To Reproduce
Steps to reproduce the behavior:
Error Messages
Screenshots / Videos / Template Code

Environment Details:
Possible Solution
The validation options appear to be set at load time. They should refresh when the search returns values.
Additional context
I would be curious if to see if this bug happens on any other places in the UI where an initial validation list of values is loaded.