Bug #89291
closedRegression in RelationHandler due to Doctrine DBAL migration
100%
Description
The Doctrine DBAL migration code had the following change in RelationHandler->purgeDeletePlaceholder()
Before
$versions = $this->getDatabaseConnection()->exec_SELECTgetRows(
'uid,t3ver_oid,t3ver_state',
$tableName,
'pid=-1 AND t3ver_oid IN (' . implode(',', $ids) . ') AND t3ver_wsid=' . $this->getWorkspaceId() .
' AND t3ver_state=' . VersionState::cast(VersionState::DELETE_PLACEHOLDER)
);
after
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($tableName);
$queryBuilder->getRestrictions()->removeAll();
$versions = $queryBuilder->select('uid', 't3ver_oid', 't3ver_state')
->from($tableName)
->where(
$queryBuilder->expr()->eq('pid', -1),
$queryBuilder->expr()->in('t3ver_oid', $ids),
$queryBuilder->expr()->neq('t3ver_wsid', (int)$this->getWorkspaceId()),
$queryBuilder->expr()->eq('t3ver_state', (int)VersionState::cast(VersionState::DELETE_PLACEHOLDER))
)
->execute()
->fetchAll();
As you can see the t3ver_wis was changed from "=" to "neq()" which is a nasty regression when dealing with deleted placeholders.
See https://review.typo3.org/c/Packages/TYPO3.CMS/+/49530/
This should be fixed.
Updated by Benni Mack about 5 years ago
- Related to Task #77565: Doctrine: Migrate RelationHandler added
Updated by Gerrit Code Review about 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61847
Updated by Gerrit Code Review about 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61818
Updated by Benni Mack about 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset b1cf4f25dc63a726a65fab228c0f081c570ce4ff.
Updated by Gerrit Code Review about 5 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61819
Updated by Benni Mack about 5 years ago
- Status changed from Under Review to Resolved
Applied in changeset 991b102ead55fd7c21c0630fcc686e9c997892fa.