Tokens are removed from rendering in Ajax enabled View when an exposed filter is selected

Created on 12 December 2024, about 1 month ago

Problem/Motivation

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

Steps to reproduce

1. Launch drupal with Token module enabled and content populated
2. Create a view that displays content (ajax enabled)
3. Add a header Text Area section to the view
4. Add a [current-page:title] token to the Text Area
5. Add an exposed filter to the view (this has been reproduced with multiple types of exposed filters, title search is easiest)
6. Place the block onto a page / view the block page
7. Observe the page's token is working properly
8. Use any option on the exposed filter
9. 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

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

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
  • 🇚🇭Switzerland berdir Switzerland

    views ajax happens on a separate route, not the one that the view is originally displayed on. that route likely has no title.

    Just for testing, try using a token that doesn't depend on the current page, that will likely work. There isn't really much this module can do about that, we don't provide that token and even if we would, we couldn't figure out the title from the available information.

Production build 0.71.5 2024