Remove empty state entries from third_party_settings

Created on 9 October 2025, 25 days ago

Problem/Motivation

The module introduces needless empty/default state configuration into core.entity_view_display.* YAML files upon config export.

Scattered around my config sync folder, I see lots of this:

    third_party_settings:
      field_formatter_class:
        class: ''

and this:

    third_party_settings:
      field_formatter_class:
        class: ''
      field_formatter_range:
        order: 0
        limit: 0
        offset: 0

This is particularly annoying when, each time I edit/change a field configuration, and I'm not specifically changing anything about the field_formatter_class settings, and want to make atomic commits relevant to a targeted field widget settings changes, we end up with dirty diffs that add in needless third_party_settings changes to fields that previously didn't have any settings.

Steps to reproduce

  1. Install field_formatter_class.
  2. Visit "Manage field display" for any content type and modify one of the field settings, but do not add any class, leave the class field blank. Save changes.
  3. Run `drush config:export`.
  4. Notice aforementioned config changes get added to the YAML config file.

Proposed resolution

Remove default (empty state) data values, including the empty string "" for the class, or zero values 0 for range order/limit/offset) before storing the data to third-party settings.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇪🇨Ecuador jwilson3

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.

No activities found.

Production build 0.71.5 2024