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?

Comments

drunken monkey created an issue. See original summary.

drunken monkey’s picture

Status: Active » Needs review
StatusFileSize
new1.28 KB
joachim’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

Patch has the wrong file ending, so isn't getting tested by CI.

ravi.shankar’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new1.28 KB

Added reroll.

joachim’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 4: 3273888-4.patch, failed testing. View results

ravi.shankar’s picture

Status: Needs work » Reviewed & tested by the community

Back to RTBC as per comment #5.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 4: 3273888-4.patch, failed testing. View results

adamps’s picture

Version: 10.0.x-dev » 10.1.x-dev
Issue summary: View changes
Issue tags: +Contributed project blocker

I hit this with content a entity type where the langcode field is set to have a configurable form display. In my experience it's not difficult to hit - the natural simple code causes the error. In config/install I have the form display config that has no schema.

I was forced to change my code in #3298538: Show subscriptions field in Manage form display. This was also hit in #2921249: Failing test due to missing content.langcode.settings.include_locked schema and they changed their code too.

adamps’s picture

Status: Needs work » Reviewed & tested by the community

Back to RTBC.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 4: 3273888-4.patch, failed testing. View results

adamps’s picture

Status: Needs work » Reviewed & tested by the community
catch’s picture

Status: Reviewed & tested by the community » Fixed

This didn't apply but has been RTBC a while so I just did the removal hunk manually. Committed/pushed to 11.x, thanks!

  • catch committed f208c821 on 11.x
    Issue #3273888 by ravi.shankar, drunken monkey, AdamPS, joachim: The "...
catch’s picture

  • catch committed 281ba514 on 11.x
    Issue #3273888 by ravi.shankar, drunken monkey, AdamPS, joachim: The...
adamps’s picture

Great thanks

wim leers’s picture

Issue tags: +Configuration schema

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.