discovered the function needed attention after
1. adding a term reference field to a NAT content type
2. node_update() for that NAT type instance, if its NAT term reference field value is same as NAT, an infinite loop occurs
3. either thread or memory heap accretion grows to the point of apache process termination (no php memory limit error, on xampp on win7).
...this may actually be a bug in drupal core. need to step into this a bit deeper...
Comments
Comment #1
jaypark commentedComment #2
jaypark commentedas the new title indicates, there is an issue with _nat_get_term_hierarchies(): it should not extract term hierarchy from NAT node term reference field. if there is a term reference field to a NAT vocabulary, the node's term reference should point to its NAT tid - not any of the NAT parents.
why would you use a node reference to select the parent tid of the node being referred to? that makes no sense to me - please, someone clarify if i'm completely missing the point.
anyway, this issue also brought to light a bug in d7 core, which i'll file shortly...
Comment #3
jaypark commentedfunny how it took one bug to find another... http://drupal.org/node/1515602
Comment #4
brooke_heaton commentedI've added a patch to make the assignment of NAT Term parent terms configurable: https://www.drupal.org/node/1085428#comment-12044689