WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 3 weeks ago

#16116 new defect (bug)

Hide 'Move to Trash' for auto drafts

Reported by: nacin Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.0
Component: Editor Keywords: dev-feedback 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 3 years ago.
16116.patch (858 bytes) - added by avryl 3 weeks ago.

Download all attachments as: .zip

Change History (8)

nacin3 years ago

comment:1 SergeyBiryukov2 years ago

Closed #19066 as a duplicate.

comment:2 SergeyBiryukov2 years ago

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

The patch still applies correctly. Moving for review.

comment:3 follow-up: nacin2 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.

comment:4 sabreuse15 months ago

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

comment:5 in reply to: ↑ 3 jdgrimes3 months 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.

avryl3 weeks ago

comment:6 avryl3 weeks ago

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

How about this? 16116.patch

Note: See TracTickets for help on using tickets.