Make WordPress Core

Opened 12 years ago

Closed 9 years ago

Last modified 9 years ago

#21563 closed defect (bug) (worksforme)

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

Reported by: f-j-kaiser's profile F J Kaiser Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4
Component: Editor Keywords:
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 12 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 (14)

#1 @ipstenu
12 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?

#2 follow-up: @SergeyBiryukov
12 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

#3 @F J Kaiser
12 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 12 years ago by F J Kaiser (previous) (diff)

#4 in reply to: ↑ 2 @F J Kaiser
12 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.

#6 @F J Kaiser
12 years 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 handler) and switches status » Button appears again.

Now that is confusing.

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

@F J Kaiser
12 years ago

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

#7 @F J Kaiser
12 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 11 years ago by F J Kaiser (previous) (diff)

#8 @ramiy
11 years ago

  • Cc r_a_m_i@… added

#9 @kovshenin
11 years ago

  • Cc kovshenin added

#10 @sabreuse
11 years ago

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

#11 @F J Kaiser
11 years ago

  • Keywords ux-feedback added

#12 @chriscct7
9 years ago

  • Keywords has-patch ux-feedback removed
  • Resolution set to worksforme
  • Status changed from new to closed
  • Version changed from 3.4.1 to 3.4

The only oddity here that I can replicate in 4.2 is when a post is privately published you can't change the status until you change the visibility to public then click okay, but that makes sense to me. This ticket appears to have been resolved at some point

#13 @DrewAPicture
9 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.