Third Party Settings missing if the field is rendered as empty

Created on 21 February 2025, about 1 month ago

Problem/Motivation

When a field has some third-party settings - they passed well to the render array if the module has the value.
But if the value is empty, they get lost, preventing the expected rendering logic from working.

Steps to reproduce

1. Configure some third-party settings in the field display settings, for example, create a text field and using this module https://www.drupal.org/project/fences add a class "foo" to it.
2. Render the field with the filled value and see that the class is present.
3. Configure the Empty value behavior to display a custom text, and make the real field value empty.
4. See that the class becomes missing in the rendered HTML.

Proposed resolution

Read the third_party_settings from the field formatter and apply them to the field.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇦🇲Armenia murz Yerevan, Armenia

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024