Actions
Bug #89291
closedRegression in RelationHandler due to Doctrine DBAL migration
Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2019-09-27
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
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.
Actions