Make WordPress Core

Opened 14 years ago

Last modified 6 years ago

#15930 new enhancement

Make trashed posts/pages still readable

Reported by: jonezjea's profile JonezJeA Owned by:
Milestone: Priority: normal
Severity: minor Version: 2.9
Component: Posts, Post Types Keywords: needs-patch make-flow
Focuses: administration Cc:

Description

I hoped I was able to see the pages which I delete (in the trashbin) but the all stay dark... So I can't view them!

I think it would be a good feature to see them to see if somebody didn't delete the wrong page! Or when you need something form a deleted page that you can still get it without restoring it first

Attachments (1)

15930.diff (7.2 KB) - added by ryan 10 years ago.

Download all attachments as: .zip

Change History (15)

#1 @johnbillion
14 years ago

  • Cc johnbillion@… added

#2 @nacin
14 years ago

  • Keywords 2nd-opinion added
  • Milestone changed from Awaiting Review to Future Release
  • Type changed from defect (bug) to enhancement

#3 @ocean90
11 years ago

  • Component changed from General to Posts, Post Types
  • Focuses administration added
  • Summary changed from Deleted page bin view? to Make trashed posts/pages still readable

#4 follow-up: @ericlewis
11 years ago

  • Severity changed from normal to minor

@JonezJeA What do mean by "readable"? You want to be able to go into the edit post screen for a trashed post?

I would suggest using the "draft" post status to inspect/edit a post's contents without publishing it.

However, this does bring up a minor UI/UX issue: when a post is in the trash, the user's only option is to "restore" the post's pre-trash status. Something that was once published that you trashed, you might want to take a look at again, but restoring it would mean making it a live post again, and then immediately change the post status to draft.

#5 in reply to: ↑ 4 @SergeyBiryukov
11 years ago

Replying to ericlewis:

Something that was once published that you trashed, you might want to take a look at again, but restoring it would mean making it a live post again, and then immediately change the post status to draft.

Related: #22350, #23022.

#6 @wpkonsulent
10 years ago

I'm surprised this hasn't gained more traction. I have lots of clients with huge sites and many, many editors who have this problem all the time. Suppose someone trashes a page and the head editor wants to see the content of the trashed page, just to make sure it wasn't trashed by accident. She can't do that without untrashing it and thereby publishing it again, which could bring all sorts of trouble on a large site. Some times there are even several trashed pages with the same name which only makes the problem worse.

Why can't we preview trashed pages, just like we can preview drafts? I'm curious what the reason might be, you know, design-wise.

Always setting post status to draft when untrashing (as suggested by #23022) is sort of fine, but IMO it would be a nice addition if we could also just preview the page without untrashing it. Just to be clear, I'm only suggesting the page to be previewed on the front end. Being able to actually edit trashed pages would probably lead to confusion, so that's not what I'm proposing.

I'd be interested in making a patch for this, btw.

#7 @johnbillion
10 years ago

  • Keywords needs-patch added; 2nd-opinion removed
  • Version changed from 3.0.3 to 2.9

Agreed. Users should be able to view a trashed post using the same or similar mechanism as previewing a draft post.

A patch would be very welcome.

#8 @ryan
10 years ago

  • Keywords make-flow added

@ryan
10 years ago

#10 @ryan
10 years ago

Attached is a quick exploration of making trashed posts editable and viewable. This required changing the 'trash' post status object from internal to protected.

  • Edit, Quick Edit, and view now show in the posts list table for trashed posts.
  • In the editor, Move to Trash is hidden for trashed posts.
  • In the editor, trashed posts now show Trash for status.
  • In the editor, trashed posts can be changed to Pending Review or Draft status.
  • In the editor, the Publish button never shows for trashed posts. Update always shows instead. Basically, trashed posts can move to pending or draft but not straight to published.
  • A partial attempt was made to add preview=true to view links for trashed posts.
  • WP_Posts_List_Table::inline_edit() needs Trash awareness added to the status selector.
  • Pages totally untouched.
Last edited 10 years ago by ryan (previous) (diff)

#11 follow-up: @krogsgard
10 years ago

For an added use case, I recently ran into this on an "Order" post type in an eCommerce plugin. In that instance, I really had no idea what would happen or be triggered if I restored it. So being able to adjust the status to other available options would've been super useful.

#12 in reply to: ↑ 11 @ryan
10 years ago

Replying to krogsgard:

For an added use case, I recently ran into this on an "Order" post type in an eCommerce plugin. In that instance, I really had no idea what would happen or be triggered if I restored it. So being able to adjust the status to other available options would've been super useful.

I'd certainly be nervous to restore a custom post type from trash given the current behavior.

My patch contribution is limited to that quick exploration. Others, feel free to run with it.

#13 @mbacklas
10 years ago

Another instance of this issue came up today - really surprised this isn't already there - anyone know why it hasn't ever worked this way? There has to be a reason they're not viewable as trash?

This ticket was mentioned in Slack in #core-flow by boren. View the logs.


9 years ago

Note: See TracTickets for help on using tickets.