Replacement Pattern Tokens are removed from View when an exposed filter is selected

Created on 9 December 2024, 9 days ago

Problem/Motivation

Replacement Pattern Tokens are removed from View display when an exposed filter is selected by the user

Steps to reproduce

1. Create a view (block in this case) that displays content (ajax is enabled)
2. Add a header Text Area section to the view
3. Add a replacement pattern token to the Text Area (in this case [current-page:title] was used)
4. Add an exposed filter to the view (this has been reproduced with multiple types of exposed filters)
5. Place the block onto a page
6. Observe the page's token is working properly
7. Use any option on the exposed filter
8. Observe the token

Observed Result - The token no longer displays anything and will not return until the page is refreshed

Proposed resolution

Tokens always display on the page if the data for the token is valid

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

10.3 ✨

Component

views.module

Created by

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

  • Issue created by @sbrenner02
  • πŸ‡ΊπŸ‡ΈUnited States yujiman85

    I followed the step-by-step directions for this issue and the only time the header disappeared was when there were no results after using an exposed filter. I was able to get the header to stay by enabling "Display even if view has no result" and it was permanently visible. Basically I couldn't reproduce this consistently, just my observation.

    Drupal 10.3.10
    View block with Ajax enabled
    Global text area using token [site:base-url]
    Exposed filters for title and published state

  • It's possible there's other factors here ... we do have 'display if no results' enabled and a good number of modules on the site but most of which are not really relevant to views, tho Better exposed Filters is in use here. I'll try to nail down better repro but we are seeing this fairly consistently on our views with tokens

  • I am updating the tags according to the issue tag guidelines β†’ and I am marking this in need of additional reproduction steps.

    @sbrenner02 Have you been able to reproduce the bug on a clean Drupal installation?

  • @yujiman85 so i have not yet done a clean install to test but i have eliminated a bunch of x-factors.

    I can confirm that this is not happening with [site:base-url] but is definitely happening with [current-page:title] - please try using this specific token

    im going to spend time trying to get more direct repro steps and work on doing a quick clean install to see if i can make it happen

  • Ok after further investigation this is an issue with tokens from the Token module. Will move the issue over there, thanks anyway!

  • πŸ‡ΊπŸ‡ΈUnited States yujiman85

    Should this be closed?

Production build 0.71.5 2024