Make WordPress Core

Opened 3 years ago

Last modified 2 years ago

#21563 new defect (bug)

"Save as" button disappearing on edit/new post screens

Reported by: F J Kaiser Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.4.1
Component: Editor Keywords: has-patch ux-feedback
Focuses: ui Cc:


When switching "visibility" from "public" to "private", the "Save as (draft/etc.)" button disappears. It doesn't come back when switching to "public" anymore.


Attachments (1)

21563_1_szenario1.patch (615 bytes) - added by F J Kaiser 3 years ago.
Hides - in case - the open status drop-down/select + "OK"-button and "cancel"-link for consistency.

Download all attachments as: .zip

Change History (12)

comment:1 @ipstenu3 years ago

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?

comment:2 follow-up: @SergeyBiryukov3 years 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:

Related: #5608, #9136

comment:3 @F J Kaiser3 years ago

@ipstenu You're slightly missing what core is doing (took me a while too).


  1. You switch from "public" » "private".
  2. ~/wp-admin/js/post(.dev).js gets involved.
  3. $.click() 1) handler triggers the updateText(); function.
  4. 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')
Last edited 3 years ago by F J Kaiser (previous) (diff)

comment:4 in reply to: ↑ 2 @F J Kaiser3 years 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:6 @F J Kaiser3 years ago

What I also think is problematic for the user (at least it was for me):

Szenario #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.


Szenario #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.

Version 0, edited 3 years ago by F J Kaiser (next)

@F J Kaiser3 years ago

Hides - in case - the open status drop-down/select + "OK"-button and "cancel"-link for consistency.

comment:7 @F J Kaiser3 years ago

  • Keywords has-patch added; needs-patch removed

The patch is for "Scenario 2" actually - it's doesn't allow the "glitch" with the open drop-down anymore.

If we need a patch to change things in general - as in the original description of the ticket - then please ping me, so I can rewrite this stuff.

Last edited 2 years ago by F J Kaiser (previous) (diff)

comment:8 @ramiy2 years ago

  • Cc r_a_m_i@… added

comment:9 @kovshenin2 years ago

  • Cc kovshenin added

comment:10 @sabreuse2 years ago

  • Component changed from UI to Editor
  • Keywords ui-focus added

comment:11 @F J Kaiser2 years ago

  • Keywords ux-feedback added
Note: See TracTickets for help on using tickets.