Project

General

Profile

Actions

Bug #89291

closed

Regression in RelationHandler due to Doctrine DBAL migration

Added by Benni Mack over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #77565: Doctrine: Migrate RelationHandlerClosedChristian Kuhn2016-08-21

Actions
Actions #1

Updated by Benni Mack over 4 years ago

  • Related to Task #77565: Doctrine: Migrate RelationHandler added
Actions #2

Updated by Gerrit Code Review over 4 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

Actions #3

Updated by Gerrit Code Review over 4 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

Actions #4

Updated by Benni Mack over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Gerrit Code Review over 4 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

Actions #6

Updated by Benni Mack over 4 years ago

  • Status changed from Under Review to Resolved
Actions #7

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF