At this moment using parent_php_code you can provide only one parent but there are situations when you have hierarchy split by different controls and one depend on another with multiple selected items. I've provided a patch to allow user specifying different parents in "parent_php_code".

Comments

Bilmar’s picture

This patch fails with the current 6.x-1.x-dev release. Is this patch to allow terms with multiple parents to be shown in
Advanced settings for hierarchical vocabularies; Parent Term:? I am experiencing this problem.

Tokyo
-Japan Rail
--Line A
---Station 1
---Station 2
--Line B
---Line 3
-Line A<= if name of this line is after 'Japan Rail' in the alphabet, this line does not show as it already appeared above(!)
--Station 1
--Station 2
etc

ERROR from patching:
(Stripping trailing CRs from patch.)
patching file content_taxonomy.module
Hunk #1 FAILED at 257.
Hunk #2 FAILED at 289.
2 out of 2 hunks FAILED -- saving rejects to file content_taxonomy.module.rej

Could this patch please be brought up to the latest dev?

YK85’s picture

subscribing

Maguar’s picture

subscribing!

summit’s picture

Subscribing, greetings, Martijn

robby.smith’s picture

confirmed terms under multiple parents are not shown more than once..making it difficult to select parent term for hierarchy of content taxonomy field.

subscribing.

robby.smith’s picture

I was wondering if there has been any progress/development in this area?
Thanks!

peterpoe’s picture

Terms with multiple parents are not repeated because they have the same term id, so they are overwritten.
You can change the building of the array from: $options[$term->tid] to something like $options["$parent][$term->tid"] but I'm not sure this is a solution, since the values of the form will not reflect the term ids anymore!

robby.smith’s picture

Does the attached patch (that no longer is up-to-date) use your suggested method or a different method? Also, as an example Taxonomy Manager module is able to successfully display all the field in the right hierarchy for fields with multiple parents.

I apologize that I know zip about programming but I hope I can help in anyway to get this issue resolved.

I would really appreciate your support!

YK85’s picture

Would anyone be able to help by creating a patch to fix this issue?
I believe this is a big issue as terms with multiple parents are not shown after their first occurence in the content taxonomy field setting of parent term to use.
Thank you!

robby.smith’s picture

kindly bumping - would anyone be able to help?

magnus’s picture

Status: Active » Needs work
Andrew Gorokhovets’s picture

subscribing

Roze-1’s picture

subscribing !

Roze-1’s picture

Status: Needs work » Fixed

Hirarchical Select + Content Taxonomy can be used to create multiple parents.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.