Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#16355 closed defect (bug) (fixed)

Clicking "Apply" in trash view shifts view back to All Items

Reported by: mrmist's profile mrmist Owned by: nacin's profile nacin
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: General Keywords: has-patch
Focuses: Cc:

Description

Scenerio -

Trash a post as an admin.
Visit the trash posts page as an author that doesn't have permission to delete said post.
Press "Apply".

The view shifts to the "All" view.
This focus change also seems to happen on "Sticky" view but does not happen for admin user, or when apply is pressed on other views (with nothing selected.)

Not major, but inconsistent UI.
(Tested in Opera)

Attachments (2)

16355.patch (687 bytes) - added by SergeyBiryukov 14 years ago.
16355.2.diff (1.6 KB) - added by nacin 14 years ago.
Includes simplified version of Sergey's patch. show_sticky is boolean.

Download all attachments as: .zip

Change History (10)

#1 @nacin
14 years ago

  • Milestone changed from Awaiting Review to 3.1

#2 @SergeyBiryukov
14 years ago

I'm only able to reproduce the issue with “Sticky” view. Here's a patch for that. Is it necessary to select a bulk action before clicking the button?

#3 @mrmist
14 years ago

Is it necessary to select a bulk action before clicking the button?

Not for the cases I've tested.

#4 @nacin
14 years ago

  • Owner set to nacin
  • Status changed from new to accepted

Surprised I missed implementing a hidden field for that. Looks good, testing the other situations now.

#5 @nacin
14 years ago

I can only reproduce on the Trash view when I actually select a bulk action. It has nothing to do with permissions, either.

I'm noticing a few issues:

  • It worked in 3.0. The only reason it did is because -- you'll like this -- the wp_redirect() on line 70 didn't have an exit, and thus the switch was evaluated (with $doaction never set), and then wp_redirect() becomes sendback. That's now fixed, but we should instead when redirect back to $sendback.
  • $post_new_file is set too late in 3.1. Gah.

Patch fixes both.

@nacin
14 years ago

Includes simplified version of Sergey's patch. show_sticky is boolean.

#6 @garyc40
14 years ago

  • Keywords has-patch added

#7 @garyc40
14 years ago

nacin's patch works fine.

#8 @ryan
14 years ago

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

(In [17362]) Fix redirects for trashed post bulk ops. Props nacin, SergeyBiryukov. fixes #16355

Note: See TracTickets for help on using tickets.