Problem/Motivation

During review, @Gábor Hojtsy raised that EntityResource::checkFieldTranslatability() only consults the field definition, and that a field the code declares translatable may not be configured as translatable on the site. The concern: could the translation API save translated values into a field that the site configuration marks untranslatable?

Investigation shows the write is already rejected in every case, but the behavior was not obvious from the single method and one case had no test coverage.

Steps to reproduce

Proposed resolution

No behavior change is required; the enforcement already reads site configuration. Add regression coverage for the previously untested case: a base field that is translatable in code but marked untranslatable by a `BaseFieldOverride`. This also guards against a regression where the check might be rewritten to read base (rather than bundle) field definitions, which would miss overrides.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lauriii created an issue. See original summary.

lauriii’s picture

Title: Ensure that base field overrides are handled correctly » Ensure that base field overrides and field translation settings are handled correctly

  • lauriii committed cd74f850 on 1.0.x
    task: #3610902 Ensure that base field overrides and field translation...
lauriii’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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