#60026Set explicitly 'readOnly' sys_language_uid of child to value, taken from parent record
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
Related issues 5
- Bug #57063Parent language is not applied to new child records
- Bug #73609Creating IRRE child element without language of parent element
- Bug #76048IRRE: Child records - New record doesn't get language of parent (non localized records but using new button)
- Epic #101557Translation Handling Findings
- Bug #110497TCEFORM sys_language_uid.disabled = 1 doesn't write correct defaults into translated entries breaking loading of IRRE for child elements
History 6
-
Viktor Livakivskyi commented <span data-processor="relativetime" data-value="2017-05-03T17:01:50+00:00" > 05/03/17, 17:01 </span>
-
Viktor Livakivskyi changed Related to #76048 <span data-processor="relativetime" data-value="2017-05-03T17:13:38+00:00" > 05/03/17, 17:13 </span>
-
Viktor Livakivskyi changed Related to #73609 <span data-processor="relativetime" data-value="2017-05-03T17:16:05+00:00" > 05/03/17, 17:16 </span>
-
leon jänicke changed Related to #101557 <span data-processor="relativetime" data-value="2023-08-03T20:17:28+00:00" > 08/03/23, 20:17 </span>
-
Eric Harrer changed Related to #110497 <span data-processor="relativetime" data-value="2026-08-28T17:33:03+00:00" > 08/28/26, 17:33 </span>
-
Benni Mack commented and changed status
NewClosed <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.
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