Fix filter label for config form

Created on 6 September 2024, 4 months ago
Updated 20 September 2024, 3 months ago

Installing this moudle, creating a view, exposing a number field as filter, I still found nowhere to configure this filter as the range filter.

I also tried to set to range filter on "authored on" and date fields, both failed.

🐛 Bug report
Status

Active

Version

1.0

Component

Documentation

Created by

🇨🇳China fishfree

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

Comments & Activities

  • Issue created by @fishfree
  • 🇩🇪Germany jurgenhaas Gottmadingen

    This module does not provide any filter for views. It provides a display extender, which allows you to configure, which filters will be rendered as a slider.

  • 🇨🇳China fishfree


    @jurgenhaas Thank you! Do you mean configuring it in an exposed number field with between operators? Or Add a display dropdown menu? But neither found I where to configure.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    As I mentioned in #2, this module does NOT provide a filter. That means you don't find it by settings filters.

    It does provide a display extender. You can enable the display extenders, that you want to use, in the advanced views settings under /admin/structure/views/settings/advanced. Once that's been done, you find the settings for the "Range slider filter" in the "Other" section of the "Advanced" section in your view. It is set to "no" by default.

    When you click on that, a popup with range slider settings opens and you can enable the range slider for that view and then select the min and max filter from this view, which have to be set-up beforehand.

  • 🇨🇳China fishfree

    @jurgenhass Thank you. However, I still cannot set min/max as the exposed 2 number equal filters as the screenshot below. What are qualified filters for views_exposed_range_slider's min/max fields?

  • 🇩🇪Germany jurgenhaas Gottmadingen

    No, there is no restriction on filters. But it looks as if Drupal 11 has changed the data structure of filters so that the config form currently can't read the label for each filter. But they are there, just without labels.

    • jurgenhaas committed 1a73d29d on 1.0.x
      Issue #3472512 by fishfree, jurgenhaas: Fix filter label for config form
      
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Please try the dev release where I have resolved that issue.

  • 🇨🇳China fishfree

    @jurgenhaas Thank you! However, after applying your commit, the selected exposed filters are still not yet converted to a range slider as the screenshot below:

    Could you pls provide a working example?

  • 🇩🇪Germany jurgenhaas Gottmadingen

    That needs debugging and looking into the javascript and the browser console. The one site where we used this module, is no longer around and I don't have need nor resources to setup anything right now, sorry. If you really have a need for this, you need to dig into it yourself.

Production build 0.71.5 2024