#22350 closed defect (bug) (duplicate)
Restored Drafts Shouldn't Have a Publication Date
Reported by: | miqrogroove | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.4.2 |
Component: | Posts, Post Types | Keywords: | editorial-flow |
Focuses: | Cc: |
Description
After creating a draft, trashing it, and then restoring it, the post editor shows a "Publish on" date as though it were a scheduled post, and the Date value in the list of all posts will be wrong after further editing (e.g. "3 hours ago, Last Modified").
Change History (9)
#2
@
12 years ago
Nacin and I noticed the related date issues while fixing #21858. There seems to be a lot of confusion about which value is supposed to go into each of the date fields.
#5
@
12 years ago
The timestamp is set because of this block:
if ( empty($post_date_gmt) || '0000-00-00 00:00:00' == $post_date_gmt ) { if ( !in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) $post_date_gmt = get_gmt_from_date($post_date); else $post_date_gmt = '0000-00-00 00:00:00'; }
Similarly, if you trash a 'draft' and haven't yet set a slug / post_name, the slug / post_name will be set when you restore it from trash.
Related #18362
Note: See
TracTickets for help on using
tickets.
Related: #19907