Hello,
Thank you for this great module which I'm sure will get a lot of attention since HS hasn't seen any updates for a little while now...
Chosen seems to conflict with the option "Allow creating new levels" in SHS as well as the "Required field" option.
The problem
the first term disappears once it has been selected leaving only the next term to choose from:


Also if you choose "add a new item" for the first term and then click cancel the Chosen js is not used anymore and a simple select list is presented, the second term has disappeared as well.


I don't see any javascript error in the console.
Comments
Comment #1
stborchertHm, I couldn't reproduce the first wrong behavior you've mentioned but committed a fix for the problem with the "cancel"-button.
You'll need to wait for the next development release (> 7.x-1.6+10-dev) to see this in action.
Comment #2
jibize commentedSorry for my late reply....
Thank you very much for looking into this.
I don't see any of the behaviours mentioned above anymore, however It looks like there is a problem:
the term is actually saved at the same tree level as the parent, it is not saved as a child of the first selected term (you need to refresh the page or look at the taxonomy tree page to see this).
This only occurs when chosen is used for the widget.
Let me know i you think it is not related to the previous issue and/or you would prefer me to create a new issue for this.
Comment #3
jibize commentedI had a chance to take a better look at it and I found a few more problems that the attached patch hopefully fixes:
Comment #4
ssoulless commented#3 works perfectly for me thanks for the patch, they would be great if they commit this patch.
Comment #5
kopeboyGuys I'm having this issue on fresh install.
When this will be included in a stable release please?
Currently, on latest Drupal core and Chosen 7.x-2.0-beta4, the selects show as default, not Chosen style.


Only after I drag one selected item (so I have to add a new item first to be able to drag), the dragged element is shown with Chosen style.
I created a separate issue
Comment #6
ssoulless commenteddid you applied the patch? I think your issue is very separated of this one
Comment #7
sja1 commentedComment #8
sja1 commentedThis patch won't apply correctly to the latest dev version. I have manually applied the patch to the latest dev, and rolled another patch (attached - patch made from inside the modules/shs/js directory). However, the chosen integration is still buggy.
With the latest unpatched dev, I added a term-reference field to a content type, and attached a vocabulary with a 2 level hierarchy. I set it to force chosen always, and to force selection of the deepest level.
When creating a new instance of the content type, the field is displayed twice. Once without chosen, and just to the right, a chosen widget with nearly zero width. (See first and second screenshots attached.)
After manually applying the patch (then clearing caches and refreshing the browser), the width of the chosen element is fixed, but I'm still getting two widgets for the one field. (See third screenshot attached.)
Comment #9
sja1 commentedRerolled patch against latest dev. The other problem I mention above (shs widget not being hidden but instead shown alongside the chosen widget), has a fix in this issue: https://www.drupal.org/node/2358437
Comment #10
stborchertClosing this issue in favor of #2084019: Support Drupal Chosen 7.x-2.0-alpha3 using Chosen v1.0 to bundle the update to Chosen 1.x.