From 2d2d58fa4b41df89a30c4ccb897b4f024c4a0a82 Mon Sep 17 00:00:00 2001 From: Nils Jung Date: Tue, 9 Sep 2025 08:44:12 +0200 Subject: [PATCH] fix: Adapt getColPosList() where content_from_pid is set On pages where `content_from_pid` is given colPos > 0 is rendered into JSON and thus behaves different than on other pages --- Classes/UserFunctions/GridRecords.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Classes/UserFunctions/GridRecords.php b/Classes/UserFunctions/GridRecords.php index ed97fc4..8679ce2 100644 --- a/Classes/UserFunctions/GridRecords.php +++ b/Classes/UserFunctions/GridRecords.php @@ -31,7 +31,13 @@ public function getColPosList(string $content, array $conf, ServerRequestInterfa { $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content'); $currentContentObject = $request->getAttribute('currentContentObject'); - $pid = $currentContentObject->data['uid']; + + if ($currentContentObject->data['content_from_pid']) { + $pid = $currentContentObject->data['content_from_pid']; + } else { + $pid = $currentContentObject->data['uid']; + } + $result = $queryBuilder ->select('colPos','pid', 'tx_container_parent') ->from('tt_content')