Skip to content

Commit

Permalink
[BUGFIX] Avoid deleted workspace relations in RootlineUtility
Browse files Browse the repository at this point in the history
RootlineUtility uses RelationHandler to resolve relations
attached to pages. The tests from #103598 show that relations
which are set to deleted ("delete placeholder", t3ver_state=2)
are not considered and still part of the result set. The
patch adds a missing call to prevent these.

Resolves: #103599
Related: #103598
Releases: main, 12.4
Change-Id: Ie580e4d9b64c477d8c9d6d4092114c18f43a2a70
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83738
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Andreas Kienast <a.fernandez@scripting-base.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Andreas Kienast <a.fernandez@scripting-base.de>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
lolli42 committed Apr 11, 2024
1 parent c076b62 commit dcac4ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions typo3/sysext/core/Classes/Utility/RootlineUtility.php
Expand Up @@ -251,6 +251,7 @@ protected function enrichWithRelationFields(int $uid, array $pageRecord): array
'pages',
$fieldConfig
);
$relationHandler->processDeletePlaceholder();
$relatedUids = $relationHandler->getValueArray();
}
$pageRecord[$column] = implode(',', $relatedUids);
Expand Down
Expand Up @@ -679,9 +679,8 @@ public static function getResolvesCorrectlyDataProvider(): \Generator
2 => [
'uid' => 1051,
'title' => 'EN WS2-changed Parent 5 Sub 1 with media deleted',
// @todo: bug. 1201 is included, but should not, since it has a delete placeholder.
// this is because $relationHandler->processDeletePlaceholder() is not called.
'media' => '1201,1200',
// It would be better if these would be the ws-overlay uids directly.
'media' => '1200',
],
1 => [
'uid' => 1050,
Expand Down

0 comments on commit dcac4ad

Please sign in to comment.