Opened 14 years ago
Last modified 7 years ago
#20903 new defect (bug)
Exporter gets stuck in a loop a loop/break in the category hierarchy
| Reported by: | westi | Owned by: | westi |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Export | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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
@
14 years ago
- Version 3.4 → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Simple fix using term_exits to check that the parent of a term exists before adding to the array to try again later.