Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 20 months 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 5 years ago.

Download all attachments as: .zip

Change History (5)

5 years ago

#1 @johnbillion
5 years ago

  • Keywords has-patch added


#2 @nacin
5 years ago

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


#3 @johnbillion
5 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
20 months ago

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