Issue Feature Closed

#60026Set explicitly 'readOnly' sys_language_uid of child to value, taken from parent record

Viktor Livakivskyi 07/01/14, 12:02 updated 10/23/26, 05:43

Description

After fix of #57063 there is still a case, when record can get sys_language_uid=0.

Whenever ‘sys_language_uid’ field of child is marked as ‘readOnly’ in config section, child record again becomes saved with sys_language_uid=0.

This is a common behaviour, since there is no need to allow editors to change language of a localization.
DataMapper needs to set explicitly sys_language_uid to value, taken from parent record, if it doesn’t appear in POST and is defined as ‘languageField’ in ‘ctrl’ section of TCA.

*Technical notes.*
If a field is marked as ‘readOnly’ it is rendered with ‘disabled’ attribute in HTML, and therefore it’s value is not sent to the server. Therefore DataMapper sets sys_language_uid to 0, since nothing comes in POST-request.

Reviews 3

History 6

  1. Viktor Livakivskyi commented <span data-processor="relativetime" data-value="2017-05-03T17:01:50+00:00" > 05/03/17, 17:01 </span>

    The same happens if sys_language_uid field is not shown at all – new record in non-default language will have it’s sys_language_uid set to ‘0’.

    TYPO3 8.7.1

  2. Benni Mack commented and changed status New Closed <span data-processor="relativetime" data-value="2026-10-23T05:43:31+00:00" > 10/23/26, 05:43 </span>

    Fixed in TYPO3 14.3.10 and main by https://review.typo3.org/c/Packages/TYPO3.CMS/+/87595 (14.3: https://review.typo3.org/c/Packages/TYPO3.CMS/+/96783): DataHandler aligns new inline and file children with the language of their parent, also when the language field is not submitted because it is readOnly, disabled via TCEFORM or not part of showitem. Same underlying problem as #110497. Existing records with a wrong language are not corrected automatically. If the problem persists for new records that are not inline children, please open a new issue with steps to reproduce.