Preview changes on a published post makes all post meta "live"
|Reported by:||jakemgold||Owned by:|
|Severity:||major||Keywords:||editorial-flow has-patch needs-testing|
|Cc:||alexkingorg@…, joachim.kudish@…, ryan@…, jared@…, bookwyrm, gabriel.koen@…, coocoomoo, xoodrew@…, jkrill, aaroncampbell, bronson@…, jbrown510@…, adamsilverstein@…, danielbachhuber, beau@…, dromsey@…, kwight@…, Ken@…, ben@…, yrosen, doughamlin@…, weston@…|
Here's the use case. Client wants to preview an update to a published post (as the Preview Changes button correctly implies they can). This post has some important post meta that impacts that preview.
Here's the problem - because post meta is not saved to a revision (it looks for the "real" post), when the preview button is pressed, save_post runs, and saves the meta data to the real, published post, even though the user only intends to preview the change.
Without realizing it, the user has updated the published version. That can be prevented by not saving post meta to revisions (when using custom save_post hooks), but then there's no non-hacky way to actually preview the full changes.
I believe this bug has been present for a while, we just rarely use the Preview function on published posts, and when we do, probably never tested it with critical post meta.
Change History (44)
comment:22 nacin — 10 months ago
- Component changed from General to Revisions
- Milestone changed from Awaiting Review to 3.6