#22350 closed defect (bug) (duplicate)
Restored Drafts Shouldn't Have a Publication Date
| Reported by: | miqrogroove | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Posts, Post Types | Version: | 3.4.2 |
| Severity: | normal | Keywords: | editorial-flow |
| Cc: | Focuses: |
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
@
14 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
@
14 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
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Related: #19907