#48 closed defect (bug) (fixed)
Incorrect functionality in get_nested_categories() in admin-functions.php
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
This function will fail for the case where you have a hirerchy
a
-b
--c
and b's id is lower than a's. In this case the category c (and its siblings) will not get added on to the list of categories returned. This can occur when categories have been moved and deleted lots. This will stop c (and its siblings) being visible in the write / edit post categories list.
I have a fix for this (see later) can one of the devs look at it and see if they want to merge it in to the code base (see additional info).
Change History (6)
#4
@
21 years ago
- Resolution changed from 10 to 20
- Status changed from assigned to closed
ophois: Thanks for the fix. I only changed things a little bit because variables like $tablecategories have been renamed $wpdb->categories...
This ticket was mentioned in Slack in #feature-respimg by joemcgill. View the logs.
10 years ago
Note: See
TracTickets for help on using
tickets.
Hmmm, turns out my suggested fix don't work. Missed a line from second function:
function get_nested_categories($default = 0, $parent = 0) {
}
Also added guard against the post having no catagories assigned to it.