Review main Ready for review

95929[BUGFIX] Language field must not be an exclude field

Georg Ringer CR 0 V -1 Hard +257 −11 updated 11/09/26, 21:38

Commit message

The TCA column referenced by 'languageField' was marked with
'exclude' => true. Access to that field is governed by the backend
user group permission 'allowed_languages', so the exclude flag
added a second, unrelated permission on top of it.

That second permission silently dropped the language value in
DataHandler whenever an editor without the exclude field right
triggered a write. Translating a record created a record in the
default language that still pointed to its source record, and
copying a translated record moved the copy into the default
language. No error was raised, and editors restricted to a
non-default language could not see the result at all.

The auto created column definition no longer carries the flag,
and a TCA migration removes it for tables that define the column
themselves or re-add it in an Overrides file. The migration
evaluates the flag with a (bool) cast, mirroring
AbstractFieldType::supportsAccessControl(), so the legacy
notation 'exclude' => 1 is covered as well. Additionally, the TCA
schema type of language fields never reports access control, so the
flag is ignored even when set in 'columnsOverrides'.

As editors with access to several languages now see the language
selector where it was hidden before, the change is not backported.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 4
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/29/95929/4 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/29/95929/4 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V -1 Blocked
    • core-ci -1 CI

Merge conflicts 10

Issues 1

Files 13

Review log 812

  1. Georg Ringer uploaded patch set 1 09/19/26, 11:12

  2. core-ci voted on patch set 1 V -1 09/19/26, 12:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108845

  3. Benni Mack commented on patch set 1 10/02/26, 14:10

    lets do this, for 15.0
  4. Georg Ringer uploaded patch set 2 V -1 10/02/26, 16:05

  5. Georg Ringer commented on patch set 2 10/02/26, 16:06

    This change is ready for review.
  6. Daniel Windloff commented on patch set 2 10/02/26, 16:19

    For the TCA Schema field `LanguageFieldType` the method `supportsAccessControl()` should be implemented with fixed return value to false. Adding this method, the behavior should be fixed. Atm you could add exlude in types column overwrites and get the not intended behavior.
  7. core-ci voted on patch set 2 V -1 10/02/26, 16:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109967

  8. Georg Ringer uploaded patch set 3 V -1 10/02/26, 16:28

  9. Georg Ringer commented on patch set 3 10/02/26, 16:28

    Reply

    Good point, thanks! LanguageFieldType::supportsAccessControl() now always returns false, covered by a unit test, so an exclude flag from columnsOverrides no longer affects DataHandler. The TCA migration stays to notify integrators and clean up the column definition.
  10. core-ci voted on patch set 3 V -1 10/02/26, 16:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109972

  11. Georg Ringer uploaded patch set 4 V -1 11/09/26, 21:10

  12. core-ci voted on patch set 4 V -1 11/09/26, 21:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113793