Opened 10 months ago

Last modified 3 months ago

#21563 new defect (bug)

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

Reported by: F J Kaiser 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

Description

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

http://i.imgur.com/EExwB.png

Attachments (1)

21563_1_szenario1.patch (615 bytes) - added by F J Kaiser 10 months 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)

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: ↓ 4   SergeyBiryukov10 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

Related: #5608, #9136

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

Situation:

  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').

Version 0, edited 10 months ago by F J Kaiser (next)

comment:4 in reply to: ↑ 2   F J Kaiser10 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.

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.

http://i.imgur.com/2tNe3.png

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.

http://i.imgur.com/avthQ.png

Now that is confusing.

Last edited 4 months ago by F J Kaiser (previous) (diff)

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

  • 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 4 months ago by F J Kaiser (previous) (diff)
  • Cc r_a_m_i@… added
  • Cc kovshenin added
  • Component changed from UI to Editor
  • Keywords ui-focus added
  • Keywords ux-feedback added
Note: See TracTickets for help on using tickets.