Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 5 years ago

#42601 closed defect (bug) (duplicate)

Wordpress 4.9 bug with page templates

Reported by: bojankr Owned by:
Priority: normal Milestone:
Component: Posts, Post Types Version: 4.9
Severity: normal Keywords:
Cc: Focuses: template

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 9 years ago.
Screenshot of error

Download all attachments as: .zip

Change History (5)

@bojankr
9 years ago

Screenshot of error

#1 @bojankr
9 years ago

  • Severity normal → major

#2 @bojankr
9 years ago

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

#3 @Presskopp
9 years ago

  • Severity major → normal

related (if not duplicate of) #42573

#4 @swissspidy
9 years ago

  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → closed

Duplicate of #42573.

Note: See TracTickets for help on using tickets.