WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 6 years ago

#16116 closed defect (bug) (fixed)

Hide 'Move to Trash' for auto drafts

Reported by: nacin Owned by: chriscct7
Milestone: 4.5 Priority: normal
Severity: normal Version: 3.0
Component: Editor Keywords: has-patch
Focuses: ui, administration Cc:

Description

The 'Move to Trash' link should not appear for auto-drafts.

This was the original intent of what [13905] removed, which I want to say was designed to reflect additional scenarios.

Attachments (2)

16116.diff (621 bytes) - added by nacin 11 years ago.
16116.patch (858 bytes) - added by iseulde 8 years ago.

Download all attachments as: .zip

Change History (13)

@nacin
11 years ago

#1 @SergeyBiryukov
10 years ago

Closed #19066 as a duplicate.

#2 @SergeyBiryukov
10 years ago

  • Keywords 3.2-early removed
  • Milestone changed from Future Release to 3.3

The patch still applies correctly. Moving for review.

#3 follow-up: @nacin
10 years ago

  • Keywords needs-patch dev-feedback added; has-patch removed
  • Milestone changed from 3.3 to Future Release

This patch is lame. Ideally what should happen is that the trash link should show after an autosave, as at that point it is no longer an auto-draft and can be deleted.

If anything, the issue right now is that if you trash an auto-draft with no data attached to it, you get an "Undo" link which untrashes it, but it just becomes an auto-draft again.

Perhaps trashing an auto-draft results in a force-delete instead, and ?deleted=1 on edit.php. That makes more sense.

#4 @sabreuse
9 years ago

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

#5 in reply to: ↑ 3 @jdgrimes
8 years ago

Replying to nacin:

This patch is lame. Ideally what should happen is that the trash link should show after an autosave, as at that point it is no longer an auto-draft and can be deleted.

If anything, the issue right now is that if you trash an auto-draft with no data attached to it, you get an "Undo" link which untrashes it, but it just becomes an auto-draft again.

Perhaps trashing an auto-draft results in a force-delete instead, and ?deleted=1 on edit.php. That makes more sense.

I agree, especially with that last part. I was expecting that trashing an auto-draft would be like canceling post creation (so post is deleted), but that isn't what happens. In fact, if you move an auto-draft to the trash, you are not only shown the undo link, but the auto-draft appears in the list of trashed posts.

@iseulde
8 years ago

#6 @iseulde
8 years ago

  • Focuses administration added
  • Keywords has-patch added; needs-patch removed

How about this? 16116.patch

#7 @chriscct7
6 years ago

  • Keywords needs-testing added

#8 @davidbhayes
6 years ago

  • Keywords needs-testing removed

Patch 16116.patch applies cleanly and has the effect of removing the ability to trash an empty autosave until it has meaningful content attached to it.

It seems to address well the conversation from @nacin and @jdgrimes. You can no longer trash an autosave, nor do you get a nonsensical offer to undo that trashing. Thumbs up!

Last edited 6 years ago by davidbhayes (previous) (diff)

#9 @chriscct7
6 years ago

  • Owner set to chriscct7
  • Status changed from new to reviewing

#10 @azaozz
6 years ago

  • Keywords dev-feedback removed
  • Milestone changed from Future Release to 4.5

#11 @azaozz
6 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 36972:

Editor: hide the Move to Trash link for auto-drafts until they are auto-saved.

Props iseulde.
Fixes #16116.

Note: See TracTickets for help on using tickets.