Opened 7 weeks ago
#64556 new defect (bug)
Tools -> Export | Failure when setting category
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | 6.9 |
| Component: | Export | Keywords: | needs-patch |
| Focuses: | Cc: |
Description
Hi,
Export of posts fails when exporting posts of a specific category. This probably has affect on other export settings as well.
File /wp-admin/includes/export.php, line 543 is supposed to echo the slug of the current category's parent. It is trying to get that data from the $cats variable, which normally contains all the categories, but it does not contain that data when limiting the posts to export to a specific category.
Current line 543:
<wp:category_parent><?php echo wxr_cdata( $c->parent ? $cats[ $c->parent ]->slug : '' ); ?></wp:category_parent>
Suggested fix:
<wp:category_parent><?php echo wxr_cdata( $c->parent && isset( $cats[ $c->parent ] ) ? $cats[ $c->parent ]->slug : '' ); ?></wp:category_parent>
Blessings,
Klaas
Note: See
TracTickets for help on using
tickets.