Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#18127 closed defect (bug) (maybelater)

Bulk actions being reseted to none

Reported by: luisferro's profile luis.ferro Owned by:
Milestone: Priority: normal
Severity: major Version: 3.2.1
Component: Administration Keywords:
Focuses: Cc:


On class-wp-list-table.php there is in line 276 (or very near) a line with:

if ( is_null( $this->_actions ) )

Then if it is null, a block of code runs, supposedly to setup the bulk actions that may exist for the current page.

This runs:
$no_new_actions = $this->_actions = $this->get_bulk_actions();

$this->get_bulk_actions() returns an empty array, meaning that both $no_new_actions and $this->_actions will take that value.

Then, the $this->_actions get updated with the content of bulk_actions-$screen_id actions.

Then, $this->_actions is parsed by array_intersect_assoc, between $this->_actions and the $no_new_actions.

The problem here is that in effect, the $no_new_actions is an empty array, and the intersection of an empty array with one array is... an empty array!

This means that no "bulk_actions" are actually setup and the table will not show ANY.

To correct the issue, just comment the array_intersect_assoc line.

Change History (3)

#1 @SergeyBiryukov
13 years ago

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

This was introduced in [17297] as fix for #16031.
The filter only allows to remove actions, just as the comment says.

Probably wontfix at this point. To support extra bulk actions properly, list tables API needs an overhaul first: #18449.

#2 @SergeyBiryukov
13 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

#3 @SergeyBiryukov
13 years ago

  • Resolution set to maybelater
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.