Make WordPress Core

Opened 6 years ago

Last modified 6 years ago

#43189 new defect (bug)

Restoring page revision doesn't restore page template previously used

Reported by: bugnumber9's profile bugnumber9 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.2
Component: Revisions Keywords:
Focuses: Cc:


I noticed this when one of the editors made a change in a page and also changed page template.
We reverted the change by restoring a previous revision, but this didn't restore the previous page template.

Change History (1)

#1 @adamsilverstein
6 years ago

Hi @bugnumber9 thanks for the bug report.

This happens because currently WordPress does not revision post meta and the page selected theme setting is stored in meta. See #20564. A possible workaround for now is to install this plugin (which I need to update): and then whitelist the _wp_page_template key using the provided filter. If we get meta revisioning in core, we can include this field by default.

Last edited 6 years ago by adamsilverstein (previous) (diff)
Note: See TracTickets for help on using tickets.