You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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:
PHP message: PHP Notice: Undefined offset: 1102 in /Users/jeremyfelt/Development/cfemedia/wp-content/plugins/distributor/includes/utils.php on line 399
In this case, 1102 is the term ID of the parent that exists on the main site, but not the distributed site. It doesn't exist in the $term_id_mapping array.
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.
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: