[wp-trac] [WordPress Trac] #20299: Preview changes on a published post makes all post meta "live"

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 25 02:02:17 UTC 2012


#20299: Preview changes on a published post makes all post meta "live"
--------------------------+-----------------------------
 Reporter:  jakemgold     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.3.1
 Severity:  major         |   Keywords:
--------------------------+-----------------------------
 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20299>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list