Opened 8 years ago
Closed 4 years ago
#37366 closed defect (bug) (duplicate)
Restoring a scheduled post can cause it to be published
Reported by: | danielbachhuber | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | needs-patch dev-feedback |
Focuses: | Cc: |
Description
If you restore a scheduled post, the post will be published if the scheduled date has already passed.
As a user, I'd expect a scheduled post to remain a draft when restored from the trash.
Steps to reproduce:
- Create a new post.
- Schedule the post to be published two minutes in the future.
- Trash the post.
- Wait three minutes.
- Restore the post from the trash.
- Look at the post to see that it's been published.
There are a few existing related tickets #23022, #19907, #22350, #18362 that haven't seen much movement. However, I think this particular issue is more egregious than the others because the user accidentally publishes content they didn't mean to publish. On higher profile sites, particularly where there are distribution mechanisms hooked into the publishing process, this bug can have a severely negative impact (for instance, accidentally publishing an embargoed post that still wasn't safe to publish).
The solution will be to clear the post date value, but I'm undecided as to whether we should do that when a scheduled post is trashed, or when it's restored from the trash.
Change History (3)
#2
@
8 years ago
Doing something a user doesn't expect definitely makes this worth prioritizing. Clearing the scheduled post date seems like an easy fix too.
Only things I'd suggest are:
- Show an in-admin alert to the effect of "Doing this will/has clear(ed) the scheduled post date."
- Add an action so devs can detect & use this event from custom schedulers
@danielbachhuber
Makes sense to default that post status back to draft.