Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#17435 closed defect (bug) (invalid)

Inaccurate order and orderby values for sortable list table columns

Reported by: johnbillion Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Administration Keywords:
Focuses: Cc:


WP_List_Table->print_column_headers() detects the 'order' and 'orderby' parameters using $_GET. It should use the values from the actual query object instead.

Example: I have a custom post type that has sortable columns. The default values for 'order' and 'orderby' are overridden in the parse_request hook. WP_List_Table->print_column_headers() ignores these values and just uses the $_GET values. This results in incorrectly highlighted columns.

Patch coming up.

Attachments (1)

17435.patch (1.1 KB) - added by johnbillion 7 years ago.

Download all attachments as: .zip

Change History (5)

7 years ago

#1 @johnbillion
7 years ago

  • Keywords has-patch added


#2 @nacin
7 years ago

  • Milestone changed from Awaiting Review to 3.2
  • Version changed from 3.2 to 3.1


#3 @johnbillion
7 years ago

  • Keywords has-patch removed
  • Resolution set to invalid
  • Status changed from new to closed

Ah you got in there before me nacin.

I'll scrap this actually, it breaks column headings for sortable columns that sort by meta_value. You can get around it by overriding the $_GET values instead of overriding the request in parse_request and everything works nicely.

#4 @SergeyBiryukov
4 years ago

  • Milestone 3.2 deleted
Note: See TracTickets for help on using tickets.