Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upon import term->parent is not correct #121

Open
pbiron opened this issue Jun 14, 2017 · 6 comments
Open

upon import term->parent is not correct #121

pbiron opened this issue Jun 14, 2017 · 6 comments

Comments

@pbiron
Copy link

pbiron commented Jun 14, 2017

Non-empty <wp:category_parent> and <wp:term_parent> elements are not processed correctly. As a result, all imported terms have term->parent == 0.

@pbiron
Copy link
Author

pbiron commented Jun 14, 2017

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.

@dcavins
Copy link
Contributor

dcavins commented Jun 22, 2017

I too have encountered this problem and have added a PR that addresses the underlying issue: #129

@pbiron Please take it for a test drive and see if it fixes the issue for you.

@pbiron
Copy link
Author

pbiron commented Jun 22, 2017

@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.

@dcavins
Copy link
Contributor

dcavins commented Jun 22, 2017

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: #130

@pbiron
Copy link
Author

pbiron commented Jun 24, 2017

@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.

@dcavins
Copy link
Contributor

dcavins commented Jun 26, 2017

@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. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants