Opened 11 months ago
Last modified 11 months ago
#20903 new defect (bug)
Exporter gets stuck in a loop a loop/break in the category hierarchy
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Export | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch 3.5-early |
| 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 (5)
- 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.