I have a multiple hierarchy vocabulary for regions. For example:
Europe
-Austria
-Turkey
Middle East
-Albania
-Turkey
If I enable this module (either multiple or single select), I get the following behaviour
1. Select Europe (fine)
2. Select Turkey (fine)
3. another select box pops out with the terms from Middle East - with Albania at the top (for example)
4. Select Turkey from that select box (because there's no option)
5. The original select box gets reset with the top term selected (Austria)
6. Select Turkey in that select box
7. back to step 3, repeat forever, start muttering.
Would be great if you could choose , or if it'd somehow stop showing that extra select box at all when there's multiple hierarchies.
Comments
Comment #1
catchAlso it seems impossible to select only a top-level term and not children, same issue really, but because of this, marking this as a bug instead.
Comment #2
wim leersIt's indeed impossible to select only a top-level term. You always have to select a "deepest" term. This is by design.
If you can figure out a way for doing what you need that makes sense, feel free to post it here.
The behavior you describe in 3. though seems like a bug. Do you have a link to a live website? Could you post a screenshot of your vocabulary's list of terms? Do you have terms with multiple parents?
Comment #3
junyor commentedWhy not have a option in all non-top-level select boxes? That would make it possible to only select a top-level term. Or, have a blank line (or "---" or "") as the default option, even in required boxes. This will force the user to choose the term rather than pre-selecting one in both boxes.
Comment #4
catch@Wim - I'll try to get screenshots to you over the next couple of days.
@Junyor: that's what I'm after really - a fix for core taxonomy module just went into D6 as well using ''.
Comment #5
catchThis is the issue: http://drupal.org/node/180109
I think it would deal with my multiple parents bug, and maybe selecting top level terms as well (which is more of a feature request, but makes this module unusable when you also have multiple hierarchies in forums for example).
Comment #6
wim leersI hadn't read that issue yet, but that indeed makes a lot more sense. That would actually *simplify* the taxonomy implementation of Hierarchical Select :P
Comment #7
derjochenmeyer commentedIt seems the patch mentioned in #5 got committed to 5.x (http://drupal.org/node/180109)
Furthermore, i agree with porfyros' duplicate post (http://drupal.org/node/190755). A multiple checkbox "save all terms path" would make it a lot more transparent to the enduser (admin, editor, ...) what is going on in the background.
The downside is this one: If you want to use Hierarchical Select for non administrators (i.e. the normal enduser) this option is too technical.
@Hierarcical select / Wim: I think this module is a huge usability step! Thanks for the work!
Comment #8
junyor commentedI applied the patch to the taxonomy module, but there was no change with the hierarchical select. I guess something has to be done in this module, too.
Comment #9
wim leersYep, changes in the taxonomy.inc file of HS are necessary too. I'm not sure when I'll have time for this though.
Comment #10
derjochenmeyer commentedI just had an idea. Instead of having a
<none>option there could be "choose level 1...", "choose level 2...", "choose level 3..."in the code it could look like this
Then it would be also easy via locale module for every user to translate that whatever he wants, lets say
choose country...
choose state...
choose city...
so it would catch this one as well http://drupal.org/node/179399
Comment #11
junyor commentedA blank value could be localized, too, as long as it's wrapped in t(), no?
Comment #12
derjochenmeyer commentedIt would be harder to find it though in the locale interface if its empty.
My suggestion is a bit ugly -> to predefine an array of t() variables.
But if you generate those values with foreach($level) you loose the ability to translate each level seperately, right?
I tried to implement it in my own sandbox, but i dont understand enough how taxonomy.inc works. But i got far enough to say its possible.
Comment #13
wim leersThat's not the same as a label. But that should be close enough for most people, yes.
Comment #14
wim leersComment #15
pepeek commentedHi,
let me summarize this thread. "Allow option in every level" is recognized as useful, it has category "feature request" and the status is active.
Currently there is no proposed solution. There is a code fragment in #10, but I do not know where to put it. It is more like a symbolic guideline, correct?
Wim, this is really useful module and this feature is a must in many use-cases (well, in mine it is :)
Do you plan on working on this? You've mentioned that it is not done by design, do you see a problem there?
If you have no time for this and you give me some hints, I can try to put it together.
I know these points must be implemented:
1. First we have to put default option (or ) to all of the select boxes starting with the second level.
2. on_select event must be modified to fill-up only the next box in the row rather then all the levels at once.
3. the submit function must store term id of the last entered box, rather then the last level one.
Correct?
Comment #16
wim leersHohoho! I guess this is one of my christmas presents to the Drupal community.
Both features (selection of an item in any level and the ability to label each level) have been implemented in the next version of Hierarchical Select. It will be committed to HEAD soon.
Comment #17
junyor commentedYay! Thank you, Wim. And Merry Christmas!
Comment #18
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.