Use replacement tokens from the first row" doesn't apply to "No results behavior"

Created on 30 September 2024, 3 months ago

Problem/Motivation

Both views header and views footer have "Display even if view has no result" and "Use replacement tokens from the first row" with tokens applied in the "Global: Unfiltered text" field. Token render correctly when there are results, however, the tokens render as code for the "No results behavior." Ajax is activated. Better exposed filters is being used for user filtering.

Steps to reproduce

  • Create filters with Better exposed filter and select "Expose this filter to visitors, to allow them to change it"
  • Make sure Ajax is activated.
  • Created header and footer using "Global: Unfiltered text" with replacement tokens, ensuring that "Display even if view has no result" and "Use replacement tokens from the first row" are both "On".
  • Create a simple message in "No results behavior" with "Global: Unfiltered text".
  • Go to the Views page or place a Views block using layout builder in a node.
  • Trigger the filtering action both with results and non-results.
  • See that the tokens render correctly when there are results, but doesn't when there are no results. The message renders correctly.
πŸ› Bug report
Status

Active

Version

10.3 ✨

Component

views.module

Created by

πŸ‡ΊπŸ‡ΈUnited States utcbrij

Live updates comments and jobs are added and updated live.
  • views

    Involves, uses, or integrates with views. In Drupal 8 core, use the β€œVDC” tag instead.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024