[wp-trac] [WordPress Trac] #64556: Tools -> Export | Failure when setting category

WordPress Trac noreply at wordpress.org
Tue Mar 24 21:46:33 UTC 2026


#64556: Tools -> Export | Failure when setting category
--------------------------+------------------------------
 Reporter:  kbpcit        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Export        |     Version:  6.9
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------
Changes (by abhishekfdd):

 * keywords:  needs-patch => has-patch


Comment:

 The issue is that when exporting posts filtered by a specific category,
 the $cats array is only populated with the categories relevant to the
 export — not all categories. If a category has a parent that isn't in
 $cats, accessing $cats[ $c->parent ] triggers an undefined index error.
 The fix adds an isset() guard before accessing the parent in the $cats
 array. I've also applied the same fix to the wp:term_parent line which has
 the identical problem with the $terms array when exporting filtered custom
 taxonomy terms.
 Attaching patch: 64556.diff

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64556#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list