Exposed filter not working

Created on 8 March 2022, over 2 years ago
Updated 7 December 2023, 7 months ago

Problem/Motivation

Exposed filter not working after enable Show Filters on Page.
The view stuck on the default value every time you try to change the filter.

$view->setExposedInput($filters);

Steps to reproduce

1- Create a view with exposed filters
2- Add block with views field (viewsreference)
3- in the field setting select Exposed Filters - editor view option
4- Place the block and chose show Filters on Page

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇯🇴Jordan Ahmad Abbad Jordan

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇪🇸Spain pakmanlh Barcelona

    I can confirm this issue after enabling the "Show exposed filters" option and after I applied the #5 patch it worked nicely. Thanks for that!

  • 🇭🇺Hungary pp

    I use Ajax in my views.
    I applied the #5 patch then filter worked fine.

    • 77042fba committed on 1.x
      Issue #3268339: Exposed filter not working
      
  • Status changed to Fixed 8 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Fixed 7 months ago
  • 🇪🇸Spain Carlitus

    This doesn't work for me.

    Steps:
    View with exposed filters
    Enabled: "Show Filters on Page"
    Filters with "All" option, because I want the user to filter, and show all by default.

    With this, no filters are applied because the code filter always with "All".

    As I see there are two main scenarios:

    1. I want to show the filters, but without filtering by default
    2. I want to show a predefined list but without options.

    The third scenario is:
    I want to show a predefined list, but I want the user modify the filter. I think this is less common, and now I don't need it, and because of that I created a MR to resolve the 1 and 2 scenario.

    (PD: I cannot reopen the issue)

Production build 0.69.0 2024