Make WordPress Core

Opened 15 years ago

Closed 14 years ago

Last modified 13 years ago

#5351 closed defect (bug) (fixed)

Drafts aren't listed as unpublished if the timestamp is set

Reported by: hailin's profile hailin Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.5
Component: Administration Keywords:
Focuses: Cc:

Description (last modified by lloydbudd)

ENV: WP trunk r8178

  1. Write a post
  2. Set the timestamp 5 minutes in the future
  3. Save it as a draft
  4. Wait 6 minutes
  5. Visit Manage/Posts

Attachments (3)

605.png (31.9 KB) - added by hailin 15 years ago.
problem screen shot
605_draft_date.diff (1.1 KB) - added by hailin 15 years ago.
proposed patch file
605_2.txt (489 bytes) - added by hailin 15 years ago.
patch #2, retain timestamp for non-drafts

Download all attachments as: .zip

Change History (7)

@hailin
15 years ago

problem screen shot

#1 @hailin
15 years ago

It's still an issue. See the attached screen capture, taken at 6:11 pm. Can you guess which ones are live and which are unpublished?

Post 19 is a future post. It doesn't explicitly say so but I can see that it hasn't been published if I check the date.

Post 33 is a regular published post - the date is in the past.

Post 37 is the type I'm referring to in the original report. Its date is in the past (1 minute ago), but it hasn't been published because it's a draft. However, there's nothing at all on the manage page to distinguish between Post 33 (published) and post 37 (unpublished).

A normal draft (which hasn't had the post timestamp explicitly set) will show 'Never' in the date column.

=======================================

The problem happends because when we first create a draft, the post_modified is saved as 0000-00-00 00:00:00. However, when we assign a future date to that draft, it carries that future time, such as 2007-12-25 10:10:10

When posts are displayed in Mangage=>posts page, "When" column displays drafts time as long as the time is not all zeros. I've changed that logic so that all drafts and pending posts are correctly displayed as "Unpublished".

Now, when a filter is selected, as as "Draft" is selected, whatever time stamp associated with the draft will be displayed. This is existing behavior, and I feel showing something is better than a straight "Never". Thus I don't modify that.

Personally, I felt that we should save the post_modified timestamp even for a draft. But Ryan said there is some historic reasons. Thus I am not going to introduce drastic changes here. Just fix the bug as it is now.

@hailin
15 years ago

proposed patch file

#2 @lloydbudd
15 years ago

  • Description modified (diff)

#3 @lloydbudd
15 years ago

  • Component changed from General to Administration
  • Milestone changed from 2.5 to 2.4
  • Version set to 2.4

setting milestone to 2.4, but waiting on new dashboard UI

@hailin
15 years ago

patch #2, retain timestamp for non-drafts

#4 @ryan
14 years ago

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

I think we cover this in the new admin.

Note: See TracTickets for help on using tickets.