use $field_type_manager->getDefaultFieldSettings() in ComputedFieldBase::getFieldDefinitionSetting()

Created on 6 July 2023, about 1 year ago
Updated 9 July 2023, about 1 year ago

Problem/Motivation

As seen in 🐛 Responses to ->getSetting() ignore requested setting string, static return value. Fixed , all sorts of things can call a field to get its settings.

In ComputedFieldBase::getFieldDefinitionSetting() we currently return NULL for everything. This can cause problems if calling code expects, say, a string or an array.

We should use use $field_type_manager->getDefaultFieldSettings() to return sane defaults.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇬🇧United Kingdom joachim

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

Comments & Activities

Production build 0.71.5 2024