Closed (outdated)
Project:
Hierarchical Select
Version:
7.x-3.0-alpha5
Component:
Code - Content Taxonomy
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jul 2012 at 13:12 UTC
Updated:
26 Oct 2018 at 02:31 UTC
Jump to comment: Most recent
Comments
Comment #1
pvdsteen commentedMake your hierarchical select field *required.
Comment #2
patoh commentedThanx pvdsteen.. On This.. Is there a way to animate the pop out select list like the ajax loading circle or something so as to show a user somethings happening. wait for it :)
Comment #3
3magnus commentedI have a "Term reference" field using "Hierarchical Select" widget and based on a two-level taxonomy tree. It's marked as "required" and has a "Default value" setted.
Even though the "<none>" option is being printed.
Comment #4
office@w3k.at commentedsame here.
will look into it tomorrow.
Comment #5
office@w3k.at commentedfile: hierarchical_select.module
It says in line 1670:
// Prepend a "" option to the root level when:
// - the form element is optional (1), or
// - enforce_deepest is enabled (2), or
// - the dropbox is enabled *and* at least one selection has been added to
// the dropbox (3)
So if you set "Force the user to choose a term from a deepest level", the option will show up event though the field is set to required and has a default value set.
A quick dirty fix is to edit line 1679:
$second_case = $config['enforce_deepest'];change to:
$second_case = !$config['enforce_deepest'];I am not sure but maybe better alternative would be:
Line 1681:
if (($first_case || $second_case || $third_case)change to:
if (($first_case && ($second_case || $third_case))Comment #6
3magnus commentedI've solved it changing line 1684 (on 7.x-3.0-alpha5+9-dev**) from:
if (($first_case || $second_case || $third_case) && (isset($special_items) && !count($special_items['none']))) {to
if ($first_case && ($second_case || $third_case) && (isset($special_items) && !count($special_items['none']))) {, closed to what you said on #5-2.
**: Version 7.x-3.x-dev from 2012-Jun-16.
Comment #7
socialnicheguru commentedthis no longer applies
Comment #8
goldWith there being no patch I am taking the comment at #7 to indicate that the issue has been resolved in some other release.
If this is not the case please provide a patch.