- Issue created by @monaw
- 🇺🇸United States superfluousapostrophe
Agreed - there is no documentation on how to actually use this module. I REALLY want to use this module! I'm trying to use it on D10.3.2 and while I think I have it mostly figured out, it's broken because of the error mentioned in https://www.drupal.org/project/views_dependent_filters/issues/3007953 → . I don't know how the maintainers can consider this module feature complete when it's clearly not working and not properly documented.
For what it's worth, here are the steps I have taken so far to get a dependent filter configured:
- Add your standard filters
- Add a dependent filter by adding a filter and searching for "Dependent Filter"
- Select your controlling filter (by the filter ID)
- Select the controller value (i.e. the option that will trigger the dependent filter)
- Rearrange the filters so that the dependent filter is ABOVE any filters that will be controlled
- Open the options of the dependent filter and select your filters to be dependent
At this point - the filter *should* be working. But like i mentioned above, there is an error regarding a missing identifier. I am assuming this means that the dependent filter itself is not supplying a filter id as all of my exposed filters have a filter identifier already.
thanks @superfluousapostrophe!
i'm currently stuck on your step #3, i don't see any selectable option for either the "Controller values" or "Dependent filters" setting (see attached image). what did i miss?
ok, i got past step #3 (previously my filter was a selective filter → which didn't work so i changed the filter to be a normal filter for the field) but it seems my dependent filters (cookstove type, cookstove name) are still not working correctly...they show up no matter what my controller filter (fire type) is set to. i'm attaching screenshots of my settings and the filters and would welcome any ideas of what i may have missed...
- 🇮🇳India libbna New Delhi, India
I followed all the 6 steps mentioned above but I am getting this error on logs and my page is all getting crashed
TypeError: array_intersect(): Argument #1 ($array) must be of type array, null given in array_intersect() (line 307 of /var/www/html/docroot/modules/contrib/views_dependent_filters/src/Plugin/views/filter/ViewsDependentFilter.php)
#0And getting this warning too
Warning: Undefined variable $user_input in Drupal\views_dependent_filters\Plugin\views\filter\ViewsDependentFilter->buildExposedForm() (line 307 of /var/www/html/docroot/modules/contrib/views_dependent_filters/src/Plugin/views/filter/ViewsDependentFilter.php)
Is there something I am missing?
- 🇧🇪Belgium StryKaizer Belgium
This module is currently not working. You need the patch from 🐛 Module uses the wrong selector Active to fix it.
The steps from #2 seem correct, once you have it patched ;)
- 🇬🇧United Kingdom joachim
There was a README file in the D7 version which had most of its content removed for the D8 port! I don't know how that happened!
That should be restored as an initial step, if it's still accurate.