Make WordPress Core

Opened 12 years ago

Closed 10 years ago

Last modified 10 years ago

#22350 closed defect (bug) (duplicate)

Restored Drafts Shouldn't Have a Publication Date

Reported by: miqrogroove's profile miqrogroove Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4.2
Component: Posts, Post Types Keywords: editorial-flow
Focuses: Cc:


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 @miqrogroove
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.

#3 @navjotjsingh
11 years ago

  • Cc navjotjsingh@… added

#4 @SergeyBiryukov
11 years ago

  • Keywords editorial-flow added

#5 @danielbachhuber
11 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);
			$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

#6 @nacin
10 years ago

  • Component changed from Trash to Posts, Post Types

#8 @Denis-de-Bernardy
10 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Dup of #19907

Version 0, edited 10 years ago by Denis-de-Bernardy (next)

#9 @SergeyBiryukov
10 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.