Bug #88046

RelationHandler does not respect deleted elements

Added by Robert Vock 3 months ago. Updated 20 days ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2019-04-01
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The Database RelationHandler does not respect deleted elements, because it removes all QueryRestrictions:

RelationHandler.php:493
RelationHandler.php:528
RelationHandler.php:652

In one of our installations, this leads to an error in workspace. We have Delete-Placeholders which are deleted (??), so t3ver_state=2 and deleted=1 but those records still do not appear at some places. Our example is an image which was deleted in the workspace and somehow restored (the DELETE-Placeholder has deleted=1). But the image still does not appear as a Thumbnail in the Backend Page View.


Related issues

Related to TYPO3 Core - Bug #88503: Delete placeholders are not considered in FormEngine TcaInline view anymore Closed 2019-06-06

History

#1 Updated by Robert Vock 2 months ago

This might be fixed with #88144

I need to check if I can reproduce this bug, when I am back at work.

#2 Updated by Susanne Moog 2 months ago

  • Status changed from New to Needs Feedback

Setting status to "needs feedback" until you checked.

#3 Updated by Susanne Moog 2 months ago

  • Category set to DataHandler aka TCEmain

#4 Updated by Oliver Hader 20 days ago

Can you please describe in which scenario this appears? RelationHandler is used in multiple different places used to retrieve (basically) live elements in correct sorting order:

  • DataHandler processing (needs view on live elements and versioned elements)
  • FormEngine used to visualize current versioning state (having to take care of delete placeholders in FormEngine currently - works in v8, regression in v9 currently)
  • Frontend via "whatever" (TypoScript, Extbase, PageRepository, ...)

PlainDataResolver is created in RelationHandler like this

    protected function getResolver($tableName, array $ids, array $sortingStatement = null)
    {
        /** @var PlainDataResolver $resolver */
        $resolver = GeneralUtility::makeInstance(
            PlainDataResolver::class,
            $tableName,
            $ids,
            $sortingStatement
        );
        $resolver->setWorkspaceId($this->getWorkspaceId());
        $resolver->setKeepDeletePlaceholder(true);
        $resolver->setKeepLiveIds($this->useLiveReferenceIds);
        return $resolver;
    }

Setting setKeepDeletePlaceholder might be context specific (setting it to true won't remove delete placeholders - required for some of the scenarios mentioned above)

#5 Updated by Oliver Hader 20 days ago

  • Related to Bug #88503: Delete placeholders are not considered in FormEngine TcaInline view anymore added

Also available in: Atom PDF