Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#39025 closed defect (bug) (duplicate)

Date on draft post not changing to current time when draft is published

Reported by: carinapilar's profile carina.pilar Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6.1
Component: Posts, Post Types Keywords:
Focuses: Cc:

Description (last modified by samuelsidler)

An user reported an intermittent issue where if they edit a draft that's been saved for a few days and then publish it, the date remains the same as the post's creation date.

This situation is happening on the 2 cases described below:

1 - When you quick edit the post on WP-Admin and change the post's Status to Published, the date when the draft was created is kept as the Published Date.

2 - When you create a post, make changes on the mobile app (iOs on this case) and then open the post on WP-Admin to publish, it also set the Published Date to when the draft was created. (this was reported on the ticket 2927271)

I was able to replicate these 2 situations on my test site. Other situations I tested, on Calypso, it worked as expected, once you publish on Calypso it changes the publishing date. Also works if you create the post on WP-Admin, save as a draft and publish later, it saves the correct publishing date.

Change History (6)

#1 @samuelsidler
7 years ago

  • Description modified (diff)

#2 @jnylen0
7 years ago

We see this issue in the REST API also. When you edit a draft in wp-admin without setting the date, the date_gmt field is set to null/zero to indicate that the draft's date should be updated each time the post is modified.

Probably, in each of these cases, something is setting the date_gmt field to a non-null value. See https://core.trac.wordpress.org/ticket/5698#comment:14 for details.

#3 @carina.pilar
7 years ago

The user sent new details about this issue:

Tonight, I noticed that the problem persists beyond the publication date. Tonight, December 26, I made a simple edit from my iPad on a post I published on the 25, and after I clicked "update," the publication date and URL of that day-old post changed to the 26. Just thought I'd let you know.


#4 follow-up: @knutsp
7 years ago

#40851 was marked as a duplicate.

#5 in reply to: ↑ 4 @giammy677
7 years ago

Replying to knutsp:

#40851 was marked as a duplicate.

Same issue with the last version of WP.

#6 @SergeyBiryukov
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #19907.

Note: See TracTickets for help on using tickets.