I was trying to use the Parent Term ID limit, I had no chance to get it working, I guess it is due to this:
$element['#parent_tid'] = $settings['parent_term_id'] || $field['settings']['allowed_values'][0]['parent'];
shoud be
$element['#parent_tid'] = $settings['parent_term_id'] ? $settings['parent_term_id'] : $field['settings']['allowed_values'][0]['parent'];
As the first is always returning 1
After patching the feature is working correctly.
Thanks for this very useful mudule.
| Comment | File | Size | Author |
|---|---|---|---|
| term_reference_tree.widget.inc_.patch | 893 bytes | marco.giaco |
Comments
Comment #1
enekid commentedThe patch works!
Thank you. It shows correctly the subtree.
But testing the functionality I got a question.
Supose we have this taxonomy
A
-B
--C
X
And have as "Parent Term ID limit" 'A' and the "Select parents automatically" checked. If we check 'C' now we get also 'B' added, but not 'A'. ¿Shouldn't 'A' also be added?
Comment #2
hephaestus commentedThanks for the patch! Works for us.
Comment #3
OnkelTem commentedThanks for the patch!
p.s. Why it is not committed yet?
Comment #4
duaelfrThe answer to #1 is "No" (I just made the test)
I think we may open a new issue to relate this problem.
Comment #5
inky@inky3d.com commentedPatch worked for me too.
Comment #6
duaelfrLet's mark it as RTBC :)
Comment #7
duaelfrSeparate issue for the automatic selection of parent terms in a filtered tree :
#1679438: Allow parents automatic selection on filtered widgets
Comment #8
Taxoman commented#1/#4: Created separate issue here:
#1679470: Option to include all parents
Comment #9
sokrplare commentedThe patch worked perfect for me with a fairly sizable list - thanks!
Comment #10
natukWorks over here as well. Thanks.
Comment #11
Zuzuesque commentedTested and worked for us. Thanks for the patch!
Comment #12
aron novakI can also confirm that the patch just works.
Comment #13
askibinski commentedI can also confirm this patch works.
Comment #14
jaydub commentedConfirmed that patch fixed issue for me as well.
Comment #15
dave reidCommitted to 7.x-1.x. Thanks everyone!
http://drupalcode.org/project/term_reference_tree.git/commit/b561a42