[PP-2] Split config removes settings and third_party_settings, leads to fatal TypeError

Created on 13 July 2022, over 2 years ago
Updated 19 October 2023, over 1 year ago

Problem/Motivation

If a field widget or formatter has settings or third_party_settings defined in the base config and removed in the split config it leads to a TypeError when importing config. For example:

TypeError: Drupal\Core\Field\FormatterBase::__construct(): Argument #4 ($settings) must be of type array, null given, called in /data/web/core/lib/Drupal/Core/Field/FormatterBase.php on line 78 in /data/web/core/lib/Drupal/Core/Field/FormatterBase.php on line 64 #0 /data/web/core/lib/Drupal/Core/Field/FormatterBase.php(78): Drupal\Core\Field\FormatterBase->__construct('my_basic_page_t...', Array, Object(Drupal\field\Entity\FieldConfig), NULL, 'hidden', 'default', Array)

Steps to reproduce

TBD

Proposed resolution

Instead of removing the entire section replace it with an empty array/object: { }

Remaining tasks

* Document steps to reproduce
* Failing test
* See if we can determine when the config key is mandatory
* Fix issue

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ› Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia mstrelan

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