The language field display component is being set as configurable ignoring the base field definition configuration

Created on 16 June 2017, about 8 years ago
Updated 23 January 2023, over 2 years ago

Problem/Motivation

Create a custom entity type and define the form display as non-configurable in the base field definitions and also have the language module installed.

You'll expect that the language component is hidden in the form display, but it is not because of language_entity_base_field_info_alter() setting it to configurable without any other checks.

The only way to deactivate it would be to implement the same hook in the module where the entity type is being defined and revert what the hook from the language module has done, which isn't DX-friendly and also requires debugging or present knowledge of what the language module is doing.

Proposed resolution

Let language_entity_base_field_info_alter() set the displays of the language field configurable only if there is no value yet provided.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
Language moduleΒ  β†’

Last updated 2 days ago

  • Maintained by
  • πŸ‡©πŸ‡ͺGermany @sun
Created by

πŸ‡©πŸ‡ͺGermany hchonov πŸ‡ͺπŸ‡ΊπŸ‡©πŸ‡ͺπŸ‡§πŸ‡¬

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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