Problem/Motivation

When saving the Manage Display settings for an entity that uses the CountUp Formatter, the following schema errors are logged or displayed. This indicates that the module is missing a config/schema/countup_formatter.schema.yml definition for its field formatter settings.

Error message:

Schema errors for core.entity_view_display.node.page.default with the following errors:
core.entity_view_display.node.page.default:content.field_countup_formatter.settings.thousand_separator missing schema,
core.entity_view_display.node.page.default:content.field_countup_formatter.settings.prefix missing schema,
core.entity_view_display.node.page.default:content.field_countup_formatter.settings.suffix missing schema,
core.entity_view_display.node.page.default:content.field_countup_formatter.settings.decimal_separator missing schema,
core.entity_view_display.node.page.default:content.field_countup_formatter.settings.scale missing schema,
core.entity_view_display.node.page.default:content.field_countup_formatter.settings.start_val missing schema,
core.entity_view_display.node.page.default:content.field_countup_formatter.settings.duration missing schema,
core.entity_view_display.node.page.default:content.field_countup_formatter.settings.prefix_suffix missing schema.

 

While this is not a fatal error, it prevents proper validation of configuration and can cause issues with configuration export/import or other modules that rely on valid schema.

Proposed resolution

Create a config/schema/countup_formatter.schema.yml file to define the schema for the countup_formatter_countupformatter field formatter settings.

The schema should map the following keys to their appropriate types (e.g., string, integer, boolean):

  • thousand_separator (string)
  • decimal_separator (string)
  • prefix (string/label)
  • suffix (string/label)
  • scale (integer)
  • start_val (float/integer)
  • duration (float/integer)
  • prefix_suffix (boolean)

Remaining tasks

  • Create config/schema/countup_formatter.schema.yml.
  • Define field.formatter.settings.countup_formatter_countupformatter.
  • Verify that saving the display settings no longer triggers the schema error.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

guido_s created an issue. See original summary.

guido_s’s picture

Assigned: Unassigned » guido_s