Task #80640 » [BUGFIX]_WS_l10n_exclude_fields.patch
typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php (revision 10d2450119c37aa2379736d8a7c1390de9cee769) → typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php (revision a5dfe6bda4e661355187798a62fa62beceddda6d) | ||
---|---|---|
'l10n_state' => 'l10n_state',
|
||
'language' => $GLOBALS['TCA'][$tableName]['ctrl']['languageField'],
|
||
'parent' => $GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'],
|
||
't3_origuid' => 't3_origuid',
|
||
];
|
||
if (!empty($GLOBALS['TCA'][$tableName]['ctrl']['translationSource'])) {
|
||
$fieldNames['source'] = $GLOBALS['TCA'][$tableName]['ctrl']['translationSource'];
|
||
... | ... | |
)
|
||
);
|
||
$modifiedIdValues = [];
|
||
foreach ($translationValues as $uid => $translationValue) {
|
||
if ($translationValue['t3_origuid'] > 0) {
|
||
$translationValue['uid'] = $translationValue['t3_origuid'];
|
||
$translationValue['backup_uid'] = $uid;
|
||
$modifiedIdValues[$translationValue['t3_origuid']] = $translationValue;
|
||
} else {
|
||
$modifiedIdValues[$uid] = $translationValue;
|
||
}
|
||
}
|
||
$dependencies = $this->fetchDependencies(
|
||
$tableName,
|
||
$this->filterNewItemIds($tableName, array_keys($idValues))
|
||
$this->filterNewItemIds($tableName, array_keys($modifiedIdValues))
|
||
);
|
||
foreach ($idValues as $id => $values) {
|
||
foreach ($modifiedIdValues as $id => $values) {
|
||
$t3OrigUid = $id;
|
||
if (isset($values['backup_uid'])) {
|
||
$id = $values['backup_uid'];
|
||
}
|
||
$item = $this->findItem($tableName, $id);
|
||
// build item if it has not been created in a previous iteration
|
||
if ($item === null) {
|
||
... | ... | |
continue;
|
||
}
|
||
// add dependencies
|
||
if (!empty($dependencies[$id])) {
|
||
$item->setDependencies($dependencies[$id]);
|
||
if (!empty($dependencies[$t3OrigUid])) {
|
||
$item->setDependencies($dependencies[$t3OrigUid]);
|
||
}
|
||
}
|
||
// add item to $this->allItems and $this->nextItems
|
||
... | ... | |
$additionalInformation = '';
|
||
if (!empty($localDataHandler->errorLog)) {
|
||
$additionalInformation = ', reason "'
|
||
. implode(', ', $localDataHandler->errorLog) . '"';
|
||
. implode(', ', $localDataHandler->errorLog) . '"';
|
||
}
|
||
throw new \RuntimeException(
|
||
'Child record was not processed' . $additionalInformation,
|
||
... | ... | |
$queryBuilder->getRestrictions()
|
||
->removeAll()
|
||
->add(GeneralUtility::makeInstance(DeletedRestriction::class))
|
||
->add(GeneralUtility::makeInstance(WorkspaceRestriction::class, $this->backendUser->workspace));
|
||
->add(GeneralUtility::makeInstance(WorkspaceRestriction::class, $this->backendUser->workspace, true));
|
||
$zeroParameter = $queryBuilder->createNamedParameter(0, Connection::PARAM_INT);
|
||
$idsParameter = $queryBuilder->quoteArrayBasedValueListToIntegerList($idsChunked);
|
||
... | ... | |
);
|
||
}
|
||
if ($this->backendUser->workspace > 0) {
|
||
$predicates[] = $queryBuilder->expr()->eq('t3ver_wsid', $this->backendUser->workspace);
|
||
}
|
||
$statement = $queryBuilder
|
||
->select(...array_values($fieldNames))
|
||
->from($tableName)
|
||
... | ... | |
&& !empty($GLOBALS['TCA'][$configuration['foreign_table']])
|
||
)
|
||
|| $this->isInlineRelationField($tableName, $fieldName)
|
||
;
|
||
;
|
||
}
|
||
/**
|
||
... | ... | |
$configuration['type'] === 'inline'
|
||
&& !empty($configuration['foreign_table'])
|
||
&& !empty($GLOBALS['TCA'][$configuration['foreign_table']])
|
||
;
|
||
;
|
||
}
|
||
/**
|
||
... | ... | |
return
|
||
State::isApplicable($tableName)
|
||
|| BackendUtility::isTableLocalizable($tableName)
|
||
&& count($this->getLocalizationModeExcludeFieldNames($tableName)) > 0
|
||
;
|
||
&& count($this->getLocalizationModeExcludeFieldNames($tableName)) > 0
|
||
;
|
||
}
|
||
/**
|