Hello,

First, thank for your module, it's very helpful.

My bug : in a field collection embed in a content type, with unlimited value, the taxonomy term reference tree doesn't stayed minimize when I add another item to the content.

In fact, when I click on the button add another item, the class 'term-reference-tree-collapsed' is removed, and I can't find why. Can someone help me a little (I knew PHP but not Javascript so It will be a little complicated for me to debug this).

Any help with be greatful.

Comments

tim.plunkett’s picture

Priority: Normal » Major

The JS code should be rewritten to use Drupal.behaviors: http://drupal.org/node/171213#behaviors

tim.plunkett’s picture

Title: Field with term reference tree in unlimited value collection field doesn't stayed minimize » Taxonomy Term Reference Tree Widget is not using the Javascript API
Status: Active » Needs review
StatusFileSize
new604 bytes

This is completely untested, but it might actually make a difference.

aron novak’s picture

Status: Needs review » Needs work

But to implement it properly, the context must not be ignored.

bartk’s picture

Status: Needs work » Closed (fixed)

Fixed in 7.x-1.x-dev

natuk’s picture

Version: 7.x-1.6 » 7.x-1.9
Status: Closed (fixed) » Active

I am sorry for reopening this, but I think the problem still exists in 7.x-1.9. When a second row is added in the field collection, expanding a branch in any row does not work properly. The branch is expanded momentarily and then it collapses immediately.

bblake’s picture

StatusFileSize
new537 bytes

I've tracked this issue down as I was having a similar problem and submitted a patch. The basic problem is that when there's an AJAX element on a drupal form, when the ajax submit and form re-building happens, it calls detachbehaviors to detach all behaviors associated with the form elements for the whole form, then re-attaches the elements for the whole form. taxonomy_term_tree didn't have a detach: clause and thus the behavior was never getting detached and would get added every time you performed an AJAX action.

bblake’s picture

Status: Active » Needs review

Changed to needs review

dave reid’s picture

Version: 7.x-1.9 » 7.x-1.6
Status: Needs review » Closed (fixed)

I think #6 is actually resolved by using .once() in #1509356: strange module behaviors when uploading image. Restoring original status.