Opened 10 months ago
Last modified 3 months ago
#21563 new defect (bug)
"Save as" button disappearing on edit/new post screens
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Editor | Version: | 3.4.1 |
| Severity: | normal | Keywords: | has-patch ui-focus ux-feedback |
| Cc: | r_a_m_i@…, kovshenin |
Attachments (1)
Change History (12)
comment:2
follow-up:
↓ 4
SergeyBiryukov
— 10 months ago
Private posts are considered to be automatically published.
There's a line (introduced in [9639]) in wp-admin/js/post.js to hide the "Save Draft" button:
http://core.trac.wordpress.org/browser/tags/3.4.1/wp-admin/js/post.dev.js#L445
comment:3
F J Kaiser
— 10 months ago
@ipstenu You're slightly missing what core is doing (took me a while too).
Situation:
- You switch from "public" » "private".
- ~/wp-admin/js/post(.dev).js gets involved.
- $.click() 1) handler triggers the updateText(); function.
- As there's no history tracking, the post gets moved to published - even when not.
This makes a post(type) go public without intention - confirmed in latest 3.5 trunk.
Currently working on a patch.
1) The click handler exists on the following elements inside the #submitdiv.postbox .misc-publishing-actions:
- ('#timestampdiv').siblings('a.edit-timestamp')
- $('.cancel-timestamp', '#timestampdiv')
- $('.save-timestamp', '#timestampdiv')
- $('#post-status-select').siblings('a.edit-post-status')
- $('.save-post-status', '#post-status-select')
- $('.cancel-post-status', '#post-status-select')
comment:4
in reply to:
↑ 2
F J Kaiser
— 10 months ago
Replying to SergeyBiryukov:
Private posts are considered to be automatically published.
That's a problem/bug, as no one knows if the author/editor/whatever really wants to "publish" - so far he hasn't hit a button. Also, there's no AJAX involved, so it's not really "published" (post status changed). It's just the js/UI denying access to the "draft/other status" button.
comment:5
SergeyBiryukov
— 10 months ago
Related: #18264
comment:6
F J Kaiser
— 10 months ago
What I also think is problematic for the user (at least it was for me):
Scenario 1)
- User has to "publish" a post. (can do it as "private publish").
- Screen reloads » User can access the a.edit-post-status-Link again.
- User sets status to "Pending Review/Draft/Custom" and gets button again.
Scenario 2)
- User hits a.edit-post-status-Link » Status Drop-Down appears
- User switches to "private" » Button disappears
- User still has the drop down/select open (doesn't get hidden by jQuery.click handler) and switches status » Button appears again.
Now that is confusing.
F J Kaiser
— 10 months ago
Hides - in case - the open status drop-down/select + "OK"-button and "cancel"-link for consistency.
comment:7
F J Kaiser
— 10 months ago
- Keywords has-patch added; needs-patch removed
The patch is for "Szenario 2" actually - it's doesn't allow the "glitch" with the open drop-down anymore.
If we need a patch to change things generall - as in the original description of the ticket - then please ping me, so I can rewrite this stuff.
comment:10
sabreuse
— 5 months ago
- Component changed from UI to Editor
- Keywords ui-focus added
comment:11
F J Kaiser
— 3 months ago
- Keywords ux-feedback added



When a post is published, be it public or private, it's no longer a draft post. You'd have to change the status back to draft for that to work.
Or am I missing what you're doing?