Token replacement should work on all element types

Created on 12 January 2023, almost 2 years ago
Updated 31 May 2024, 6 months ago

Problem/Motivation

Currently, token replace is only called on elements of type link. When rendering the body of a node which contains tokens via layout builder and wrapping the element with a div, tokens are not replaced.

Steps to reproduce

Create a node with a token in the body. Enable layout builder for the full display. For the body field configuration, configure the formatter to be 'text_field_formatter' and choose the div wrapper. Save and observe the node.

Proposed resolution

Update the textFieldFormatter->viewElements() method to replace tokens for all item values.

Remaining tasks

Create patch.

User interface changes

None.

API changes

None.

Data model changes

None.

โœจ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States luke adams

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024