LanguageItem field type's value can be any string, should be a valid language code.

Created on 5 October 2014, about 11 years ago
Updated 23 September 2025, about 1 month ago

Problem/Motivation

The new LanguageItem's value should only be allowed to contain a valid language code. Currently, the property definition of the 'value' property is set to "string". There should be additional logic to capture invalid language codes.

Proposed resolution

See if this can be fixed by by using the OptionsProviderInterface.

Remaining tasks

- Write failing test that attempts to set an invalid language code

User interface changes

- None

API changes

- None

Original report by @mauzeh

🐛 Bug report
Status

Postponed: needs info

Version

11.0 🔥

Component

entity system

Created by

🇳🇱Netherlands mauzeh

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

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