When Level Labels is enabled in the HS settings for a vocabulary, the label for root level should be selected as it is for the sublevels. The choice is selected instead.
In addition, when a term is required AND Level Labels is enabled, the choice should not be added and the label for root level should be selected.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AlenaSystems’s picture

The second paragraph should read:

In addition, when a term is required AND Level Labels is enabled, the choice <none> should not be added and the label for root level should be selected.

Wim Leers’s picture

Assigned: Unassigned » Wim Leers
Status: Active » Postponed (maintainer needs more info)

Do you have the dropbox enabled? If yes, then this is by design. It's to indicate that the user doesn't have to select another item.

AlenaSystems’s picture

FileSize
10.76 KB
9.31 KB

Yes, there is a dropbox that includes the default value for a new node, or previously selected values.

If this is not a bug, it is a feature request because this behavior is confusing for end-users:
When a user creates a new node, he finds the REQUIRED taxonomy field not only with a default value already listed in the dropbox but with the choice <none> selected in the list, when the expected behavior should be a empty dropbox and the label for root level selected (see attached screenshots of current vs. expected behavior for a new node).

Wim Leers’s picture

Status: Postponed (maintainer needs more info) » Active

Hm, that's a regression then. The current *designed* (but obviously bugged ATM) behavior is:
- when 0 items are added to the dropbox, the level label should be selected by default
- when >= 1 are added to the dropbox, the <none> option should be selected by default

Will be fixed.

AlenaSystems’s picture

Part of the problem is that, when using the taxonomy module, the very first item is added to the dropbox by default when none of them was previously selected. That is probably why the <none> option is actually selected then (see current.png).

Wim Leers’s picture

Oh! I thought that bug was fixed. Are you sure you're using Drupal 5.7?

Wim Leers’s picture

Status: Active » Postponed (maintainer needs more info)

I need confirmation that you're using the latest Drupal version, because in older Drupal 5 versions, it's due to a bug in the Taxonomy module that the first term gets selected by default.

Wim Leers’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I'm closing this issue, because:
1) I really suspect that an outdated Drupal version is the cause
2) the issue queue is very noisy ATM, lots of issues "need more information"

If you DO have the newest Drupal version and the issue persists, please mark this issue "active" again, or I won't see it!

TySkby’s picture

Version: 5.x-2.2 » 7.x-3.0-alpha5
Status: Closed (fixed) » Needs review

Don't know if this is the correct thread anymore since it's a bit dated, but I'd like to see this reopened, as I can report that this issue exists in Drupal 7 with 7.3-3.0-alpha5.

My configuration:
-Dropbox is disabled
-Root label is set
-Forced to deepest level
-3 levels
-User can add terms to levels 2 and 3 (not root)
-Field is required

At the Root level, I have the following list:

  • Select State
  • < none >
  • Alabama
  • etc.

This is confusing to users (as noted previously) because they already have a label to explain the Root level and they know that the field is required, but a < none > option still appears as an 'option' in the list.

Edit: I'd like to add that the Root label ("Select State") is selected as default. However, I would suggest/request that this < none > field be removed from this type of configuration (especially if the field is required) for the same reasons the OP had.

yuseferi’s picture

i have the same issue.
mr WIM LEERS why distort the issue?

i ask u this problem in your website, and drupal stack extange and u tell me this issue answered in HS issue .really your are fool or suppose we are fool???

i myself done all of this solution but your module is buggy with this feature.
when i apply the parent restriction for term refrence with another widget like select list it's work correctly , the probem is in your module. i use drupal 7.14 and hs "7.x-3.0-alpha5" .

instead distort the issue solve it!!!!!!!!!!!!!!!!!!!!!!!!!

yuseferi’s picture

Priority: Normal » Critical
Status: Needs review » Patch (to be ported)
FileSize
863 bytes

finally i found your mistake
in your code , in hs_taxonomy.module
in function hs_taxonomy_hierarchical_select_root_level($params) you don't consider
$params['root_term'] and in every hs this item bypassed by 0 value

$terms = _hs_taxonomy_hierarchical_select_get_tree($params['vid'], 0, -1, 1);

must be

$terms = _hs_taxonomy_hierarchical_select_get_tree($params['vid'], $params['root_term'], -1, 1);

if user not set parent in content_taxonomy settings for term reference it passed 0 by default.

please apply this patch to your module.
just notice for this work correctly you want select (not duplicate second level select option)
Save term lineage
in Hierarchical Select configuration in Save lineage part.
i test it ,working like a 'BENZ'

Wim Leers’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

Makes sense — thanks :)

Summit’s picture

Status: Reviewed & tested by the community » Needs work

Hi,
I applied the patch from #11, and tried saving a term.
still the root level is not staying attached, it moves again back to not having root level selected and is shown...
SO when I try to save a term it says there is not parent relation attached..
I set this back to needs work.

greetings, Martijn

nlambert’s picture

I have the same configuration as in #9
#11 doesn't work for me. All options disappear.

nlambert’s picture

Status: Needs work » Needs review

  • stefan.r committed 58ef5fd on 7.x-3.x authored by nlambert
    Issue #263365 by zhilevan, AlenaSystems, nlambert: <none> selected...
stefan.r’s picture

Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

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