Opened 16 months ago
Last modified 4 months ago
#19907 new defect (bug)
Updating an unpublished draft post in quick-edit mode sets the post's publish date
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Quick/Bulk Edit | Version: | 2.7 |
| Severity: | major | Keywords: | has-patch needs-unit-tests editorial-flow |
| Cc: | navjotjsingh@… |
Description
Problem:
- If you update an unpublished draft post in quick-edit mode, the post's publish date is saved.
- Then, later on, when you actually publish the post, its publish date is incorrect.
Suggested fix:
- If the post is a draft, do not automatically set the post's publish date in quick-edit mode.
Steps to reproduce:
(1) Go to WP-Admin -> Posts.
(2) Create and save a new post. Make sure you click "Save Draft" — not "Publish".
(3) Note that the post is marked as "Publish immediately"; that is, it has no publish date.
(4) Go back to WP-Admin -> Posts.
(5) Hover your pointer over the post you just created. Click "Quick Edit".
— Note that in the panel that appears, the "Date" field is automatically set to [the current date and time].
(6) Click "Update" in quick-edit mode.
(7) Hover your pointer over the post you just updated. Click "Edit".
— Note that in the Edit Post page that appears, the post is now marked as "Publish on: [the date and time from step (5)]"
Attachments (2)
Change History (13)
- Milestone changed from Awaiting Review to 3.4
- Severity changed from normal to major
SergeyBiryukov — 16 months ago
SergeyBiryukov — 16 months ago
comment:2
SergeyBiryukov — 16 months ago
- Keywords has-patch added; needs-patch removed
- Version changed from 3.3.1 to 2.7
- Keywords ux-feedback removed
I don't know that I'd call it major, since it's been there since 2.7, but the desired behavior is that when using quick edit when a post is a draft, it should adjust 'last edited' not 'publish' time.
comment:8
SergeyBiryukov — 7 months ago
Related: #22350
comment:9
SergeyBiryukov — 7 months ago
- Keywords punt removed
comment:10
navjotjsingh — 6 months ago
- Cc navjotjsingh@… added
comment:11
SergeyBiryukov — 4 months ago
- Keywords editorial-flow added

Has been this way since Quick Edit was introduced in 2.7 (#8144).
The problem is that edit_date is true by default:
http://core.trac.wordpress.org/browser/tags/3.3.1/wp-admin/js/inline-edit-post.dev.js#L238
And the condition for $clear_date in wp_update_post() is not satisfied:
http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/post.php#L2693
19907.patch brings the similar check and comment into edit_post().
19907.2.patch sets edit_date to false (doesn't touch post_date_gmt).