Commit 0fb7fe8a authored by Oliver Hader's avatar Oliver Hader Committed by Benni Mack
Browse files

[BUGFIX] DataMapProcessor does not exclude workspace versions

DataMapProcessor, used to resolve and handle the language synchronization
feature, does not exclude workspace versions correctly. That's why it
might happen, that inline records are not correctly synchronized in the
live workspace if translations exist in any workspace.

Resolves: #79769
Releases: master
Change-Id: Id1d724ae38aeddefbe82a316624a75315d1a93f1
Reviewed-on: https://review.typo3.org/51647


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
Reviewed-by: default avatarThomas Hohn <thomas@hohn.dk>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent b05e119b
......@@ -18,6 +18,7 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\Restriction\BackendWorkspaceRestriction;
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
use TYPO3\CMS\Core\Database\RelationHandler;
use TYPO3\CMS\Core\DataHandling\DataHandler;
......@@ -537,7 +538,8 @@ class DataMapProcessor
->getQueryBuilderForTable($tableName);
$queryBuilder->getRestrictions()
->removeAll()
->add(GeneralUtility::makeInstance(DeletedRestriction::class));
->add(GeneralUtility::makeInstance(DeletedRestriction::class))
->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class, $this->backendUser->workspace, false));
$statement = $queryBuilder
->select(...array_values($fieldNames))
->from($tableName)
......@@ -666,7 +668,8 @@ class DataMapProcessor
->getQueryBuilderForTable($tableName);
$queryBuilder->getRestrictions()
->removeAll()
->add(GeneralUtility::makeInstance(DeletedRestriction::class));
->add(GeneralUtility::makeInstance(DeletedRestriction::class))
->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class, $this->backendUser->workspace, false));
$zeroParameter = $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT);
$idsParameter = $queryBuilder->createNamedParameter($ids, Connection::PARAM_INT_ARRAY);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment