[wp-trac] [WordPress Trac] #46609: Incorrect posts date on saving scheduled posts draft

WordPress Trac noreply at wordpress.org
Mon May 27 08:22:56 UTC 2019


#46609: Incorrect posts date on saving scheduled posts draft
--------------------------+------------------------------
 Reporter:  Marlimant     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Date/Time     |     Version:  5.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by Rarst):

 * keywords:  reporter-feedback =>


Comment:

 I've looked into this and I think you are correct about this being broken,
 there is an issue with saving drafts specifically.

 If post is scheduled, the preview date is correct. However when draft,
 with explicit scheduled date, is saved/previewed it's not.

 The underlying reason seems to be that `wp_update_post()` will explicitly
 strip a date from `draft` unless `edit_date` flag is set in post data. I
 am not sure what the legacy behavior was, but for the current
 Gutenberg/REST API approach that flag is not being set on draft save.

 I am ''guessing'' this is not intended behavior, but I am not familiar
 with Gutenberg enough to say for sure / look through front–end logic.

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


More information about the wp-trac mailing list