Field config returns translatable === true if on a bundle that is not translatable

Created on 23 March 2015, over 9 years ago
Updated 29 April 2024, about 2 months ago

Problem/Motivation

Say you have a field on both the article and basic page bundles but only the article bundle is translatable. Calling isTranslatable() on the field config for the basic page bundle will return true. This is the problem. If the basic page bundle becomes translatable (but not the field itself), isTranslatable() correctly returns false. So basically, as @plach said, the translatability is inherited from the field storage if they are not configured in the UI.

Proposed resolution

I believe it doesn't make sense for a field config to call itself translatable if it is in fact not. But I also probably am missing a lot of context info as to why this is. So it's very much open to discussion.

Remaining tasks

Discuss this issue and come to an agreement on the matter.

User interface changes

None.

API changes

Unclear.

Original report by @Upchuk

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Field 

Last updated about 12 hours ago

Created by

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.

Sign in to follow issues

Merge Requests

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