Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#4071 closed defect (bug) (worksforme)

Searching for unpublished post has date of 1969

Reported by: robertaccettura Owned by: rob1n
Milestone: Priority: low
Severity: minor Version: 2.1.3
Component: Administration Keywords: date admin edit search
Focuses: Cc:


This is similar to ticket 2164.

If you save a post as draft, and search for it using wp-admin/edit.php, you get a date 1969-12-31 6:00:00 pm.

Ideally this should say "Unpublished" or "Future".

Change History (5)

#1 @rob1n
9 years ago

  • Milestone changed from 2.1.3 to 2.2

This is most likely because the drafts are stored with a timestamp of 0. Which is epoch IIRC.

#2 @SteveLewis
9 years ago

Cannot duplicate with wp 2.10+ using MySQL 5.0.22.


I inspected this ticket thinking it may be an easy one to offer a patch for, but I can neither verify it nor postulate conditions to possibly recreate.

I see that ryan committed code for this in changeset [4491] (11/19/06 07:24:55). This code is part of the 2.1.3 tag (source:/tags/2.1.3/wp-admin/edit.php#L180).

It occurred to me that the reporter may have a broken value for the post_modified datetime in the database. Inspecting upgrade-schema.php, I can see that the table schema for that field has not changed historically and the field default is as-expected.

Possible points for further investigation:

  • does MySQL have a bug/documented 'feature' in datetime handling in the version being used by the reporter?
  • was date_modified set incorrectly in the past as part of a now-resolved bug in post updating?
  • was date_modified set incorrectly as a result of a php / mysql lib / platform bug?

We would need more information about a failing environment to determine what to do.

Feel free to double check my work.

#3 @foolswisdom
9 years ago

  • Milestone changed from 2.2 to 2.4

SteveLewis, wow, very thorough, thank you for participating in Wordpress!

Using trunk at a recent revision, I am able to duplicate this minor problem. I search for a term I know is in a draft and the When column shows '1999-11-30 12:00:00 am' and there is no other indication that it is a draft.

#4 @rob1n
9 years ago

  • Milestone changed from 2.4 to 2.3
  • Owner changed from anonymous to rob1n
  • Status changed from new to assigned

#5 @rob1n
9 years ago

  • Milestone 2.3 deleted
  • Resolution set to worksforme
  • Status changed from assigned to closed

Searching for results with a draft in them shows Unpublished as the post date, on trunk r5521.

Note: See TracTickets for help on using tickets.