#19205 closed defect (bug) (fixed)
Orphaned categories can be created by accident
Reported by: | dzver | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | minor | Version: | |
Component: | Taxonomy | Keywords: | has-patch needs-unit-tests |
Focuses: | Cc: |
Description
There are two ways to do that.
- You can work on category tree from two browser windows.
- In window one, delete a category
- In window two, add a child to the category that has been deleted.
wp_insert_term needs to check if the parent exists.
- If you delete a couple of categories with bulk-delete, a third level child node can become orphan.
wp_delete_term uses get_term to find the parent node and can retrieve cached data.
Attachments (1)
Change History (6)
#2
@
11 years ago
- Keywords has-patch added
Diff attempts to address issue (1). After the $args
are parsed, checks term_exists()
if needed.
#3
@
10 years ago
- Keywords needs-unit-tests added
- Milestone changed from Awaiting Review to 4.0
We should inspect this with unit tests
Note: See
TracTickets for help on using
tickets.
Related: #8119