Opened 13 years ago
Last modified 6 years ago
#20903 new defect (bug)
Exporter gets stuck in a loop a loop/break in the category hierarchy
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.1 |
| Component: | Export | Keywords: | has-patch |
| Focuses: | Cc: |
Description
Ideally it should be impossible for a loop/incorrect parentage in a category hierarchy to exist.
But sometimes they do.
If one does exist then export_wp() gets stuck :(
It gets stuck in this code:
// put categories in order with no child going before its parent
while ( $cat = array_shift( $categories ) ) {
if ( $cat->parent == 0 || isset( $cats[$cat->parent] ) )
$cats[$cat->term_id] = $cat;
else
$categories[] = $cat;
}
Similar to #20635 but different.
Attachments (2)
Change History (6)
#2
@
13 years ago
- Version changed from 3.4 to 3.1
This uses to have a looping guard prior to [15961] so setting Version to 3.1
Note: See
TracTickets for help on using
tickets.
Simple fix using term_exits to check that the parent of a term exists before adding to the array to try again later.