[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 22:11:15 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 azaozz):

 The "gist" of the problem is that clicking "Preview" submits the whole
 form, i.e. quite similar to clicking either Save or Update or even
 Publish, without changing the post_status.

 For drafts this works well. It is equal to clicking Save Draft + View Post
 in a new tab. All data from all form fields (including those added by
 plugins) is saved.

 However for published posts this is not ideal. The filters that run on
 updating and inserting posts can trigger all sorts of related tasks and
 many plugin authors are not aware that the post is not being updated, only
 previewed.

 This needs standardizing. Thinking that best would be to limit what is
 being submitted on clicking "Preview" and "Preview Changes" only to
 post_title, post_content and excerpt. Then add a filter for additional
 form fields that will be saved and included in the preview. This could
 work by filtering `$_POST`. Even maybe set `DOING_AUTOSAVE` or perhaps
 `DOING_PREVIEW`.

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


More information about the wp-trac mailing list