WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#32586 closed defect (bug) (duplicate)

Different actions in the two "Bulk Actions" dropdown will always perform the upper action

Reported by: Kau-Boy Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: Quick/Bulk Edit Keywords: has-patch
Focuses: Cc:

Description

As I reviewed and tested the ticket #31634 I found another quite critical bug. When you select different actions in the two dropdowns and then hit "Apply", the first action will be used. Let's think of the following scenario:

  • You go the the comment trash
  • You mark all comments using the top checkbox
  • You select "Delete permanently"
  • You scroll through the list and deselect some comment
  • You than decide, that you rather want to move the selected comments to spam
  • You select "Mark as Spam" in the lower "Bulk Actions" dropdown
  • You hit the lower "Apply"
  • Your comments will then be deleted permanently and not marked as spam, as shown in the dropdown next to the lower apply button

Depending on the action you have chosen in the top dropdown (maybe unintentionally, as some browsers scroll throught the dropdown values after closing the dropdown, when using the scroll wheel on a mous), this can be really critical, especially for actions, you can't undo, like the permanent deletion.

My suggestion would be to always set the value in both dropdowns to the same value, each time the users changes the value in one dropdown.

P.S. This issue is being provided by the WordCamp Cologn 2015 Contributor Day #wccgn

Attachments (1)

32586.diff (634 bytes) - added by Kau-Boy 4 years ago.

Download all attachments as: .zip

Change History (5)

@Kau-Boy
4 years ago

#1 @Kau-Boy
4 years ago

  • Keywords has-patch added

#2 @obenland
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #16185.

#3 @jdgrimes
4 years ago

While the proposed solution is a duplicate of #16185, I don't think that the problem itself is a duplicate. I think this issue can also be solved on the server side, by checking which of the "Apply" buttons was clicked. Of course, we'd have to give each of those buttons a unique name attribute.

#4 @Kau-Boy
4 years ago

I agree, that a server side solution should also be thought of (although it's probably more complex to solve on all backend pages). My patch is more focued on a correct UX, as he knows what to expect, when clicking any of the two buttons.

Note: See TracTickets for help on using tickets.