#42601 closed defect (bug) (duplicate)
Wordpress 4.9 bug with page templates
Reported by: | bojankr | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.9 |
Component: | Posts, Post Types | Keywords: | |
Focuses: | template | Cc: |
Description
Ok, so shortly, custom theme has couple of page templates, all affecting pages only, located in theme template-parts folder (like _s structure).
When I updated Wordpress to 4.9, I can't create page templates anymore, when I add page template, choose unique name, it doesn't show up on page templates list (as tho values, or list of files is cached somehow).
When i rename template name in already existing page-template, it changes it properly in templates list (in page edit).
But, when I rename page-template into (old name: template-example.php) for example: template-newexample.php, i get error:
Warning: file_get_contents(/vagrant/wp-content/themes/mytheme/template-parts/template-example.php): failed to open stream: No such file or directory in /vagrant/wp-includes/class-wp-theme.php on line 1042
as tho it is cached somewhere.
This is happening when I try to rename any page template, not just certain one, and even if that page template isn't used anywhere, it still bugs out
Screenshot of error