Bug #88063
openDataHandler checks parent instead of inline table on localization
0%
Description
DataHandler line 4107: copyRecord_processInline()
4125: // If language is set and differs from original record, this isn't a copy action but a localization of our parent/ancestor:
4126: if ($language > 0 && BackendUtility::isTableLocalizable($table) && $language != $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']]) {
4127: // Children should be localized when the parent gets localized the first time, just do it:
4128: $newId = $this->localize($v['table'], $v['id'], $language);
4129: }
In line 4126 it is checked if the parent but not the child table is localizable.
This leads to the following problem:
If you try to localize a record e.g. a download(localizable) which holds multiple downloadfiles(table is not localizable), an error is thrown that says :
'1: Localization failed; "languageField" and "transOrigPointerField" must be defined for the table ...'
Updated by Susanne Moog over 5 years ago
- Category set to DataHandler aka TCEmain
Updated by Markus Klein over 5 years ago
@Philipp Can you please push a patch to Gerrit?
Updated by Pascal Rinker over 5 years ago
I had the same problem couple of weeks ago and debugged this "issue" until I determined that it´s more a feature than a bug. In TYPO3 9 the DataHandler copies your records if you´re going to localize them. Those records are in the same table and have the same values than the original if you set `l10n_mode = exclude`. In my opinion are these fields required for the DataHandler to know which record contains which language and what the original uid was.
Updated by Tymoteusz Motylewski 3 months ago
- Related to Bug #90170: Datahandler localize translates inline records with non-translatable parent record added