The "language_select" field widget is part of Core, but its config schema is in a module

Created on 7 April 2022, about 2 years ago
Updated 18 September 2023, 9 months ago

Problem/Motivation

Core itself defines a “Language select” field widget (\Drupal\Core\Field\Plugin\Field\FieldWidget\LanguageSelectWidget). However, the config schema definition for that widget (added in #2827784-34: LanguageSelectWidget should have options for which language types to show ) is part of The Language module, in core/modules/language/config/schema/language.schema.yml.

Therefore, it is possible to use the “Language select” field widget without having its config schema definition available.

Steps to reproduce

Define a new content entity type where the langcode field is set to have a configurable form display with default type language_select. Any test without the language module enabled will fail with an error like this:

Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for core.entity_form_display.simplenews_subscriber.simplenews_subscriber.default with the following errors: core.entity_form_display.simplenews_subscriber.simplenews_subscriber.default:content.langcode.settings.include_locked missing schema

Proposed resolution

Simply move the config schema definition to Core, where it belongs.

Remaining tasks

  • Review patch
  • Probably write a test?

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

None needed, I’d guess?

🐛 Bug report
Status

Fixed

Version

10.1

Component
Field 

Last updated 2 days ago

Created by

🇦🇹Austria drunken monkey Vienna, Austria

Live updates comments and jobs are added and updated live.
  • Contributed project blocker

    It denotes an issue that prevents porting of a contributed project to the stable version of Drupal due to missing APIs, regressions, and so on.

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.69.0 2024