Created on 11 September 2024, 7 months ago

Problem/Motivation

I can't figure out how to use this module. I have done the following:

  1. read the module page
  2. looked at a previous issue with the same title which has several links that are no longer valid
  3. looked at the README.txt which hopefully is quite outdated as it says "Can't be used on production"
  4. tried editing one of my existing views by adding a dependent filter but can't figured out how to specify the filter that is dependent on the controller filter (see attached images of my configuration)

and I still can't figure it out...sorry if I'm a big dufus.

I'm using D10.2.7. My view uses the basic exposed filter, not the Better Exposed Filters.

Proposed resolution

It would be very helpful to have more info on this module's page on how to setup a view using this filter...a step-by-step would be very nice along with screenshots (:

💬 Support request
Status

Active

Version

1.2

Component

Documentation

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • 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:

    1. Add your standard filters
    2. Add a dependent filter by adding a filter and searching for "Dependent Filter"
    3. Select your controlling filter (by the filter ID)
    4. Select the controller value (i.e. the option that will trigger the dependent filter)
    5. Rearrange the filters so that the dependent filter is ABOVE any filters that will be controlled
    6. 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)
    #0

    And 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.

Production build 0.71.5 2024