Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 3 years ago

#42601 closed defect (bug) (duplicate)

Wordpress 4.9 bug with page templates

Reported by: bojankr's profile 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

Attachments (1)

Screenshot from 2017-11-17 15-13-04.png (112.4 KB) - added by bojankr 7 years ago.
Screenshot of error

Download all attachments as: .zip

Change History (5)

@bojankr
7 years ago

Screenshot of error

#1 @bojankr
7 years ago

  • Severity changed from normal to major

#2 @bojankr
7 years ago

I want to say, when I reverted back to previous patch (4.8.3), everything worked fine.

#3 @Presskopp
7 years ago

  • Severity changed from major to normal

related (if not duplicate of) #42573

#4 @swissspidy
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #42573.

Note: See TracTickets for help on using tickets.