WordPress.org

Make WordPress Core

Opened 21 months ago

Last modified 21 months ago

#43189 new defect (bug)

Restoring page revision doesn't restore page template previously used

Reported by: bugnumber9 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.2
Component: Revisions Keywords:
Focuses: Cc:
PR Number:

Description

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
21 months 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): https://wordpress.org/plugins/wp-post-meta-revisions/ 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 21 months ago by adamsilverstein (previous) (diff)
Note: See TracTickets for help on using tickets.