Bug #104396
closedDataHandler::inlineLocalizeSynchronize fails for tables without versioning
100%
Description
In https://github.com/TYPO3/typo3/blob/12.4/typo3/sysext/core/Classes/DataHandling/DataHandler.php#L5031 the andWhere Clause `'AND t3ver_oid=0'` is always appended, even for tables without versioning. This leads to an invalid field exception `unknown column t3ver_oid`.
Original:
$parentRecordLocalization = BackendUtility::getRecordLocalization($table, $id, $command['language'], 'AND t3ver_oid=0');
Quick patch was:
- $parentRecordLocalization = BackendUtility::getRecordLocalization($table, $id, $command['language'], 'AND t3ver_oid=0');
+ $useVersioning = (bool) ($GLOBALS['TCA'][$table]['ctrl']['versioningWS'] ?? false);
+ $versioningWhereClause = $useVersioning ? 'AND t3ver_oid=0' : '';
+ $parentRecordLocalization = BackendUtility::getRecordLocalization($table, $id, $command['language'], $versioningWhereClause);
Updated by Gerrit Code Review 4 months ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85345
Updated by Gerrit Code Review 4 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85345
Updated by Gerrit Code Review 4 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85355
Updated by Gerrit Code Review 4 months ago
Patch set 2 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85355
Updated by Gerrit Code Review 4 months ago
Patch set 3 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85355
Updated by Benni Mack 4 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c874b30c7930e9f865c28ea797a85d215080fb68.
Updated by Gerrit Code Review 4 months ago
- Status changed from Resolved to Under Review
Patch set 4 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85355
Updated by Benni Mack 4 months ago
- Status changed from Under Review to Resolved
Applied in changeset 752ecd62701f58214a9540e0a0b7a2bde8428f8d.