Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#32996 closed defect (bug) (fixed)

List tables: Provide a fallback when primary column doesn't exist

Reported by: ocean90's profile ocean90 Owned by: helen's profile helen
Milestone: 4.3 Priority: normal
Severity: normal Version: 4.3
Component: Posts, Post Types Keywords: has-patch
Focuses: Cc:


If you have a CPT and change the column names so that you don't have a title column anymore you currently get an empty table in responsive views.
WP_List_Table::get_primary_column_name() should fall back to WP_List_Table::get_default_primary_column_name() if the default column doesn't exist.

Attachments (1)

32996.patch (1.1 KB) - added by ocean90 9 years ago.

Download all attachments as: .zip

Change History (2)

9 years ago

#1 @helen
9 years ago

  • Owner set to helen
  • Resolution set to fixed
  • Status changed from new to closed

In 33266:

List tables: Even more robust fallback for the primary column.

Since WP_List_Table::get_default_primary_column() can be overridden in a subclass and columns can be further filtered, it is possible to end up with a primary column that no longer exists. This is particularly evident in list tables for custom post types that have been altered via filter.

props ocean90.
fixes #32996.

Note: See TracTickets for help on using tickets.