Open pbiron opened 7 years ago
I've got a fix for this but can't yet submit a PR for it until the Simple namespace-aware parsing PR is merged because the fix for this relies on the unit tests I added in that PR.
I too have encountered this problem and have added a PR that addresses the underlying issue: https://github.com/humanmade/WordPress-Importer/pull/129
@pbiron Please take it for a test drive and see if it fixes the issue for you.
@dcavins Glancing thru the changes in your PR it looks like your fix is more complete than mine (one of these days I'll wrap my head around the $this->mapping
and post_process_xyz()
code in this plugin).
I'll give yours a try when I get a chance and report back.
Thanks @pbiron. I had to do some digging to understand what's going on with the term import, too. Basically, the $exists
array is meant to be a cache to avoid a million individual MySQL queries for terms. I opened a new issue about some thoughts on the exists and mapping arrays here: https://github.com/humanmade/WordPress-Importer/issues/130
@dcavins I just had a chance to review your PR and it passed all the tests I wrote for it. So, hopefully, it'll get merged soon.
@pbiron Thanks for testing this PR out. It's great to have another pair of eyes look at it, and I love it when somebody's got tests to apply. 👍
Non-empty
<wp:category_parent>
and<wp:term_parent>
elements are not processed correctly. As a result, all imported terms haveterm->parent == 0
.