Problem/Motivation

When a filter is both exposed, grouped, and has its grouped filter identifier changed from the default (the filter's machine name), a selected value is not saved into the block configuration when placing or editing an instance of the view block.

Steps to reproduce

  1. Create a view with a block display.
  2. In Block settings, Allow settings, check "Configure filters".
  3. Add a filter and check "Expose this filter to visitors".
  4. Change "Filter type to expose" to "Grouped filters", and configure filter groups below.
  5. Save the view.
  6. On the Block layout page, add an instance of the view block to a region.
  7. Give the filter a value and save the block.
  8. Find the saved block in the list and click Configure: the selected filter value will not be loaded. The filter will be set to "All".
  9. Inspect the block configuration using drush: the filter value is set to "null"

Proposed resolution

Correct Block::extractExposedValues() to use the group identifier when the filter is grouped.

Remaining tasks

n/a

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Issue fork ctools-3554311

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

apkwilson created an issue. See original summary.

apkwilson’s picture

Title: Taxonomy Term filter exposing a grouped filter doesn't save value when placing block » Exposed grouped filters don't save value when placing block
Issue summary: View changes
Related issues: -#3468120: Filter identifier doesn't work for grouped taxonomy filter

Generalizing the issue title and summary, since the problem applies to all exposed, grouped filters with a custom identifier, not just taxonomy index id filters.

japerry made their first commit to this issue’s fork.

japerry’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.