Closed (fixed)
Project:
Hierarchical Select
Version:
5.x-3.0-rc7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
9 Jan 2009 at 05:48 UTC
Updated:
2 Apr 2009 at 16:50 UTC
I'm experiencing a bug with the HS Taxonomy Views filters which I believe may be larger issue with the HS widget. When using a HS taxonomy such as the one below, I experience the following issue. After selecting a term and submitting the form, the view is correctly filtered. However, if I select the "___" (empty) or "<none>" options in the top level of the HS and submit the form again, the form is set back to what I had selected the first time.
Sample options in the HS widget:
___ (empty)
<none>
<all>
Fruits
--> Apple
--> Banana
--> Orange
Vegetables
--> Broccoli
--> Carrot
--> Spinach
Comments
Comment #1
wim leersInteresting bug. The reason turned out to be an optimization that no longer applies when you're on a GET form. I'm rendering a "flat select" to allow for GET form compatibility. This is rendered on the server after each update, so it only gets set when the server is contacted. But when "none" is selected, the server is not being contacted, because there are no children for it, so an update doesn't make sense. However, when used on a GET form, the server *should* be contacted, so that the "flat select" is re-rendered.
This patch fixes that.
D5: http://drupal.org/cvs?commit=180056
D6: http://drupal.org/cvs?commit=180062
Comment #2
jrbeemanThis is fantastic - the fix works great. Thanks, Wim.