With a taxonomy of this way
A1--A2.1
--A2.2--A3.1
--A3.2
Where the different levels are parents of a term, the function returns:
A1
A2.1
A2.2
And my expectatios is to bring the whole tree.
I've check that it stops because of the condition is
while ($parent = taxonomy_get_parents($parents[$n]->tid))
as soon as a parent doesn't have parents it stops looking for in other parents, A2.2 in the example.
I've seen in http://drupal.org/node/873414 a similar problem was found in Drupal 6 but the patch proposed in http://drupal.org/files/issues/multiple_parents_0.patch didn't pass the Simle Test.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | taxonomy_get_parents_all-1982032-1.patch | 608 bytes | olveraricardo72 |
Comments
Comment #0.0
olveraricardo72 commentedsome formating
Comment #0.1
olveraricardo72 commentedmore formating
Comment #0.2
olveraricardo72 commentedlost in formating
Comment #1
olveraricardo72 commentedProposed patch
Comment #2
panchoThanks for your contribution!
However, I'm closing this as yet another duplicate of #217676: taxonomy_term_load_parents_all() doesn't work correctly with multiple hierarchy terms.
You may look at patch #16 for temporary use until this has been committed to D8 and backported to D7.
Comment #3
olveraricardo72 commentedThanks!
Comment #3.0
olveraricardo72 commentedformating!!!