Make WordPress Core

Opened 3 years ago

Last modified 12 months ago

#52470 new defect (bug)

Exported WXR contains terms twice

Reported by: karl94's profile karl94 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Export Keywords: has-patch
Focuses: Cc:


How to reproduce: after a fresh WordPress install (no active plugins) go make a WXR export file. If you open the WRX file you'll notice the Uncategorized appears twice: the first time as wp:category element, the second as a wp:term.
The wp:category comes from, the wp:term from With the setup described (no plugins) the only registered taxonomies are the builtin ones, therefore $custom_taxonomies contains an empty array. When get_terms() receives an empty array as the taxonomies param it will return all terms, of every taxonomy.
This also means that if there are other taxonomies registered the issue doesn't show up.

This is a regression: on WordPress 4.4 it doesn't happen.
A git bisect pointed to as the culprit.
The commit states that it maintains backwards compatibility, but it does not in case an empty array is passed as taxonomy param.

Change History (3)

#1 @sabernhardt
3 years ago

  • Component changed from General to Export

#2 @hellofromTonya
3 years ago

  • Version trunk deleted

Removing trunk as the Version as predates 5.7 (current trunk). Actual trunk can be set once root cause is identified.

This ticket was mentioned in PR #4969 on WordPress/wordpress-develop by decodekult.

12 months ago

  • Keywords has-patch added

When exporting all content and no custom taxonomies are defined.

Note: See TracTickets for help on using tickets.