Incorrect workflow_state_formatter['#label_display']

Created on 18 April 2025, 7 days ago

Problem/Motivation

When the 'Default' formatter is selected, the title of the field is not aligned according to the 'Form Display' settings.
Thisis because the function sets ['#label_display'] hardcoded.

Steps to reproduce

- select 'Default' in 'Form display' with 'in line' label.
- display a node, the field label is not according to the settings.

Proposed resolution

Let the function not set the ['#label_display'], but set it afterwards if needed.
Core code will merge the hardcoded values with configured codes, but will not overwrite the hardcoded values.

Remaining tasks

User interface changes

API changes

In some cases, you need to set the title_display afterwards:

     $widget = workflow_state_formatter($entity, $field_name);
     $widget['#label_display'] = 'before'; // 'above', 'hidden'.

Data model changes

🐛 Bug report
Status

Active

Version

1.8

Component

User interface

Created by

🇳🇱Netherlands johnv

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

Comments & Activities

Production build 0.71.5 2024