Bug #80855
closedStory #69617: FormEngine bugs
IRRE: "Localize all records" and "Synchronize with default language" not working anymore
100%
Description
A field using the following TCA definition:
'inline_relation' => [
'exclude' => TRUE,
'label' => 'Inline relation',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_myext_domain_model_child',
'foreign_field' => 'parent',
'foreign_sortby' => 'sorting',
'maxitems' => 9999,
'appearance' => [
'collapseAll' => 1,
'levelLinksPosition' => 'both',
'showSynchronizationLink' => 1,
'showPossibleLocalizationRecords' => 1,
'useSortable' => 1,
'showAllLocalizationLink' => 1
],
],
],
If I hit these buttons, nothing happens. I tried to do some debugging and i found the following:
FormInlineAjaxController::synchronizeLocalizeAction() on line 322 ($parentData = $formDataCompiler->compile($formDataCompilerInputForParent)), in $parentData['databaseRow'] the sys_language_uid field is set to [0 => 0] (the uid field contains the uid of the localized parent record) - shouldn't this be set to the correct language uid?
Therefore the $parentLanguage in line 325 is set to 0.
This results in the following $command array being passed to TYPO3\CMS\Core\DataHandling\DataHandler::inlineLocalizeSynchronize():
[
'field' => 'inline_relation',
'language' => '0',
'action' => 'localize'
]
This leads to the condition in DataHandler line 4869 being TRUE, which will cancel the processing:
$language = $command['language']; // = 0!
...
...
if (!$parentRecord || !is_array($parentRecord) || $language <= 0 || !$transOrigPointer) {
return;
}
These are my findings - not sure if this will help. If you need further info, just tell me.
Together with https://forge.typo3.org/issues/80080, IRRE localizations seem to be broken, which is a serious problem...
Files