Using tokens in attributes in Expert field template broken

Created on 11 September 2019, over 5 years ago
Updated 26 December 2023, over 1 year ago

For display, I'd like to add a tooltip on a field (A) with the value of another field (B). This works in theory, but the value is garbled.

What am I doing:

  • In Manage Display I add a display for field "A".
  • I select the "Expert" Field Template.
  • I check "Field Item" and add in the Attribute field title="[node:field_b:value]".

When I see the result, the field will have a tooltip, with the content of field_b, cropped at the first space. Also, " which appear in the field B value will be shown as ". The value of field B is: Tëst" Foo Bar, the result is Tëst".

In the source code, the result looks like this:

<div  title="Tëst&amp;quot;" >
      <h2>
  Field A value</h2>
</div>

Useful example: I have a media type "Image", with a copyright field (text plain). I want to have the copyright statement as tooltip of the image.

🐛 Bug report
Status

Closed: outdated

Version

3.0

Component

Code

Created by

🇦🇹Austria plepe

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.

Production build 0.71.5 2024