-
Notifications
You must be signed in to change notification settings - Fork 156
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
A PHP notice is generated when distributing child terms without parents #219
Comments
It would be helpful to know the actual error. :)
In this case, |
…p#219 also, remove parent them, if it's removed in source
When parent is not mapped, but we are trying to update term parent in destination, we may damage existing hierarchy and bring secondary level terms to root level. Please check #262, where this issue is solved. |
In its current state Distributor results in a PHP notice when you attempt to assign a child term from a hierarchy where the parent term does not yet exist on the other site and when that parent term is also not selected for distribution.
distributor/includes/utils.php
Lines 394 to 402 in 052307f
The code assumes the parent exists as an already mapped term when it attempts to update the latest term. This is probably okay when both the parent and child have been selected.
For my specific case, I'm less concerned about the relationship on the distributed content, so I would choose to skip
dt_update_term_hierarchy
for this taxonomy. I'm going to open a pull request suggesting that$taxonomy
be provided to that filter so that this can be enabled/disabled based on that value rather than as a blanket decision.It does seem that handling of the term hierarchy is somewhat of a larger problem than that.
The text was updated successfully, but these errors were encountered: