Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#43705 closed defect (bug) (duplicate)

Respect custom taxonomy term order on admin edit page when show_ui and sort are both true

Reported by: seanleavey's profile seanleavey Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.1
Component: Taxonomy Keywords:
Focuses: Cc:

Description

This is identical to the report in #40436, but that has been awaiting review for 12 months and might have fallen under the radar due to being set to version 4.7. The issue is still present in 4.9.5. The order of terms is not respected on e.g. the admin post list. It displays alphabetically even when sort is set to true in register_taxonomy (in addition to show_ui set to true to make it show on the post list).

The order is not respected because the call to wp_get_object_terms via column_default in WP_Posts_List_Table does not supply an $args array telling it how to sort. WordPress should probably supply this array with the order_by key set if the taxonomy's sort attribute is true.

Change History (4)

#1 @seanleavey
7 years ago

It should be added that using the get_the_terms filter in get_the_terms in wp-includes/category-template.php does not allow this behaviour to be added via a plugin (without completely requerying the terms), because the filter does not supply the term_order column from the term_relationships database table.

#2 @soulseekah
7 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Hey, welcome back to Trac! There is not need to open duplicate tickets just because old ones seem abandoned :) feel free to star it, and continue (bump) the discussion there.

Closing as duplicate of #40436

#3 @netweb
7 years ago

Duplicate of #40436.

#4 @netweb
7 years ago

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