Opened 10 years ago
Last modified 6 years ago
#32039 new defect (bug)
Publish date when publishing a scheduled post in the past
Reported by: | adambarclay | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.1.1 |
Component: | Posts, Post Types | Keywords: | |
Focuses: | Cc: |
Description
Given the following steps:
- Set a post to be scheduled at a later date, i.e. 20/04/2015 11:30
- Wait until that time has passed and then click 'Publish', i.e. at 21/04/2015 09:00
The post's published date is set to the date at which it was scheduled to go live, when in reality it was not actually pushed to a published state until the time publish was clicked.
$post->date
was 2014-04-20T11:30
and not the expected 2014-04-21T009:00
, and published date in UI shows the incorrect date.
Although this is not necessarily a common occurrence (basically forgetting to click Publish / Schedule) it is possible in the UI and leads to a confusing date, and one that in our case breaks other functionality that relies on a published date.
Change History (2)
#2
@
10 years ago
The problem I see here is one of obviousness. This took me quite a while to understand what I had done incorrectly (originally came from using the WP-API plugin, https://github.com/WP-API/WP-API/issues/1124). The post became published when I clicked 'Publish'. I had not made a deliberate attempt to have a backdated post.
Perhaps this scenario within the UI should be more explicit? If you are publishing a post after a scheduled date let me choose whether that actually becomes a backdated post post, or one posted at that instant.
As far as I can see, this is no different than creating a backdated post right away.
If I set a specific date, I would expect it to be preserved, even if it's already in the past at the time of publishing.