wp-cli / export-command

Exports WordPress content to a WXR file.
MIT License
12 stars 27 forks source link

Add parameter to ignore orphaned terms #108

Closed zaerl closed 12 months ago

zaerl commented 1 year ago

Feature Request

For reference: p1686742627912759-slack-C02AVAR9B.

See: https://github.com/wp-cli/export-command/blob/main/src/WP_Export_Query.php#L372

Right now, the entire export fails if an orphaned term is found. We should add a parameter to ignore this kind of error. With the new parameter, the entire export should not fail, but the term should have the parent set to 0 (no parent).

An orphaned term can appear when:

  1. Something has gone bad with "Categories and Tags Converter"
  2. A user has manually removed a category parent
  3. And similar

FYI: @danielbachhuber

danielbachhuber commented 1 year ago

I'm amenable to this change 👍

Feel free to submit a pull request, if you'd like. Here is some guidance on our pull request best practices.

jacksonwp commented 1 year ago

At contributor day, taking a look at this