Issue with providing contextual filter value for view block?

Created on 1 November 2022, about 2 years ago
Updated 23 February 2024, 10 months ago

Problem/Motivation

In D9.4.8:
List(text) Contextual Filter input on Layout Builder modal provides an empty dropdown list of options...

Steps to reproduce

For example:

  1. Add a List(text) field_category to the Article content type, with several key|value pairs defined.
  2. Define a View Block for Articles, with field_category being the contextual filter.
  3. Give Basic Page the ability to use Layout Builder...
  4. ...then Add Block via Layout to add that View Block display, which brings up the LB dialog.
  5. The dialog shows the category contextual filter option, as a dropdown...
  6. ...however the dropdown is not populated with any valid values, just "-None-"... and cannot figure out any way to get them to populate...

Proposed resolution

There is this issue #2759445 in the Ctools issue queue ✨ How to manually pass an argument to a views block through interface Needs review , that seems to indicate there an issue with contextual filters and layout builder, and attempts to address it. By patch #70, it provides a separate field that does allows me to input the category name (and works). However, the dropdown field still displays and still is empty...

Is what I'm experiencing with the dropdown actually still a bug in core? (if so, I can't seem to find any issue reported on this)
Or is there something I'm missing doing to have this field dropdown simply populate with the "allowed values list" of options declared in field settings?

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
Layout builderΒ  β†’

Last updated 4 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States fizcs3 Omaha, Nebraska; USA

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.

  • πŸ‡ΊπŸ‡ΈUnited States fizcs3 Omaha, Nebraska; USA

    Following up...
    Just tried this on a fresh install of Drupal 10.2.3, and confirming that this remains a bug in core.
    Also tried adding Article's Tags taxonomy field as a contextual filter on that view block, and it actually does not appear at all on the layout builder Configure block modal... while the List(Text) field filter does, but gives "-None-" for options.

Production build 0.71.5 2024