Make WordPress Core

Opened 13 years ago

Closed 10 years ago

#16475 closed defect (bug) (duplicate)

Displaying submenus in custom taxonomy of active parent

Reported by: nick4fake's profile nick4fake Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Administration Keywords: has-patch
Focuses: Cc:

Description (last modified by markjaquith)

In a hierarchical taxonomy, if a top level item in the hierarchy is selected when editing a post, after save that item's orphaned children and grandchildren will also show as top level items. It flattens the hierarchy.

Attachments (2)

16475.patch (3.0 KB) - added by tamme 13 years ago.
16475_2.patch (3.3 KB) - added by tamme 13 years ago.

Download all attachments as: .zip

Change History (10)

#1 @markjaquith
13 years ago

  • Keywords taxonomy menus removed
  • Milestone changed from Awaiting Review to Future Release

Here is my hierarchy:

http://grab.by/grabs/2f2644aaa710df65f459d2435b735d02.png

After Selecting "Top Level 2" and saving:

http://grab.by/grabs/16fb3a9f8a5d0abb7c5a0f03c5175e1e.png

Reproduced in 3.0, so not a new bug. How hierarchical taxonomies are displayed might need a rethink.

#2 @markjaquith
13 years ago

  • Description modified (diff)

#3 @tamme
13 years ago

I have added and attachment (16475.patch) that changes the way the categories are displayed. Its a proposed solution for the problem. The hierarchy will remain intact after a save, and it will sort the categories putting the checked ones at the top. When sorting, higher levels have priority over lower levels.

For instance in the above example if you would check 'Top Level 2' and 'Foo Child2' and 'foo grandchild', you would get the following hierarchy after saving.

[x]Top Level 2

[x]Foo Child2


[ ]Foo Child


[x]foo grandchild

[ ]Top Level 2

The downside to this way of displaying the categories is that there is a bigger chance that they are not all shown after loading the page. The user might have to scroll.

Last edited 13 years ago by tamme (previous) (diff)

@tamme
13 years ago

#4 @tamme
13 years ago

  • Keywords ui-feedback ux-feedback added

#5 @tamme
13 years ago

The code above isn't 100% correct. I will fix the mistake and put the new version here later.

@tamme
13 years ago

#6 @tamme
13 years ago

The second patch does not contain any problems anymore.

#7 @SergeyBiryukov
13 years ago

  • Keywords has-patch added

#8 @helen
10 years ago

  • Keywords ui-feedback ux-feedback removed
  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #10982; a filter was introduced in #20054 to change the behavior as desired.

Note: See TracTickets for help on using tickets.