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

WordPress Trac noreply at wordpress.org
Sun Jan 19 20:54:45 UTC 2014


#20299: Preview changes on a published post makes all post meta "live"
-------------------------------------------------+-------------------------
 Reporter:  jakemgold                            |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Revisions                            |  Release
 Severity:  major                                |     Version:  3.3.1
 Keywords:  editorial-flow has-patch needs-      |  Resolution:
  testing                                        |
-------------------------------------------------+-------------------------

Comment (by adamsilverstein):

 As far as I can tell - in trunk - the post meta is not saved to
 '''published''' posts when clicking preview. Testing using the 'Custom
 Fields' section of the edit post page, the values are not saved until I
 click publish (when a post is in the draft state, the meta is saved when I
 click the preview button).

 I believe the ticket description is (no longer) accurate when it states
 "when the preview button is pressed, save_post runs, and saves the meta
 data to the real, published post".

 The bigger, remaining, issue is: "there's no non-hacky way to actually
 preview the full changes". This is because the wp_create_post_autosave
 function does not save the post meta - when the preview is loaded from the
 revision, post meta is pulled from the parent post.

 (The function post_preview calls wp_create_post_autosave for published
 posts, creating an 'autosave' revision, and returns a url for previewing
 this autosave. )

 The current patch for #20564 (Framework for storing revisions of Post
 Meta) includes _wp_preview_meta_filter to display revisioned post_meta
 fields with the preview. Landing #20564  will go a long way towards fixing
 this and #23314.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/20299#comment:43>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list