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.

Comments

olveraricardo72’s picture

Issue summary: View changes

some formating

olveraricardo72’s picture

Issue summary: View changes

more formating

olveraricardo72’s picture

Issue summary: View changes

lost in formating

olveraricardo72’s picture

StatusFileSize
new608 bytes

Proposed patch

pancho’s picture

Status: Needs review » Closed (duplicate)

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

olveraricardo72’s picture

Thanks!

olveraricardo72’s picture

Issue summary: View changes

formating!!!