Notice: Undefined index: country in views_dependent_filters_handler_filter_dependent->exposed_form() (line 267 of /var/www/mysite/sites/all/modules/contrib/views_dependent_filters/views_dependent_filters_handler_filter_dependent.inc).
I receive the above error, and the dependent fitler is never hide.
My configuration:
I'm using LOCATION module, and I have an exposed filter "location:country" that have to show the exposed filter "location:distance/proximity" only when a defined country is chosend from first field ("italy" in my case).
Nothing works and alla exposed filters are always shown.
Notice that I've also applied patch in http://drupal.org/node/1441352#comment-5631010 but without success.
Thank you very much for resolving this.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | views_dependent_filters-1763988-17.patch | 937 bytes | mustanggb |
Comments
Comment #1
jibus commentedSame here :
Notice : Undefined index: type dans views_dependent_filters_handler_filter_dependent->exposed_form() (ligne 267 dans /var/www/localhost/www/sites/all/modules/views_dependent_filters/views_dependent_filters_handler_filter_dependent.inc).
Type filter field is the depend exposed field.
Comment #2
Ted51 commentedI have the same problem when I use Search API module. Is very fine without this module
Comment #3
errev commentedI got the same problem.
I exposed in block for Search with Search API.
Comment #4
errev commentedIt looks like, no issue for this one.
Nobody is careing
Comment #5
joachim commentedI'm afraid that I no longer have much time at all to look after this module, as I am no longer working on the project it was initially developed for.
Cab you debug and do some of the work towards figuring out where the problem lies?
Comment #6
kyletaylored commentedThis worked for me.
Comment #7
vivdrupal commentedPatch in #6 removed the error for me.
Thanks
Comment #8
narkoff commentedThe patch in #6 removed the error for me as well. Thanks @kyletaylored.
Comment #9
aczietlow commentedI had a similar issue with using this module with search API. The patch #6 removed the error, and still works as intended. @kyletaylored ++
Comment #10
kyletaylored commentedComment #11
nwom commented#6 worked for me as well. I think this is RTBC.
Comment #12
nwom commentedNevermind, it most likely needs to be rerolled for the current dev.
Comment #13
alex.bukach commentedThe patch from #6 seems to contain an mistake that kills the module:
This conditions is always false (since at that stage there exists
$form_state['input'], at least empty), and therefore the code inside never works (and hence does not throw an error), and dependent filters aren't killed when they should.Here's another patch that must fix the issue preserving module functionality.
Comment #14
kyletaylored commentedMan, what was I thinking 2 years ago... Sorry, I was a little green. Haha.
#13 looks much better.
Comment #15
mustanggb commentedPatch got rid of the error messages, but it didn't solve the problem, which is that when a user visits the view for the first time the form_state input is empty, so the view results don't reflect the filter settings.
In-case it matters my exposed filters form is in a block.
Comment #16
mustanggb commentedSo here is my take on it, if a value hasn't been set through the exposed filter it uses the default value instead, which is the value the exposed filter will use anyway.
views_dependent_filters_handler_filter_dependent.inc
Comment #17
mustanggb commentedAnd a patch of #16.
Comment #18
john cook commentedPatch #17 fixes the problem.
Comment #19
donquixote commentedWith this patch I now get
in this line:
I suppose this is because of this:
If $input is already an array, then array($input) will be a nested array, which blows up array_intersect().
In my case, the filter is NOT configured as "multiple", but Views still stores an array as the default value.
- Filter type to expose: Single filter
- Required: Yes
- Operator: "Is one of"
- Expose operator: No
- Value: Checked "Category 1", "Category 2", "Category 3" (out of 7 categories)
- Allow multiple selections: No
- Remember the last selection: No
- Limit list to selected items: Yes
The view is a search API view, and the filter is for "content type".
I would say this is a bug in Views.
Or maybe it is caused by bef or vefl, which I also have enabled.
Comment #20
donquixote commentedSee also #2704545: views_handler_filter::exposed_form() is messed up.