From 414b3e9a469de1d8e3536ebdc2157b2d19e780e0 Mon Sep 17 00:00:00 2001 From: Nikita Hovratov Date: Mon, 24 Jul 2023 10:41:26 +0200 Subject: [PATCH] [BUGFIX] Check if '_ORIG_uid' really exists in ElementInformationController The computed property '_ORIG_uid' is only set for workspace records, which are NOT moved (t3ver_state=4). It is better to check directly for the existence of this key as done in all other occurrences where it is retrieved. The presence already ensures that we are dealing with an overlaid workspace record and that there is need to fetch the original uid. Resolves: #101426 Releases: main, 12.4, 11.5 Change-Id: I7dd1072736b476015d5d44cb82f5e670fdd484a7 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80136 Reviewed-by: Christian Kuhn Tested-by: core-ci Tested-by: Christian Kuhn --- .../Controller/ContentElement/ElementInformationController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php b/typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php index 918cc4cb8cfc..beb54da68ff4 100644 --- a/typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php +++ b/typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php @@ -96,7 +96,7 @@ public function mainAction(ServerRequestInterface $request): ResponseInterface } else { $this->row = BackendUtility::getRecordWSOL($this->table, $uid); if ($this->row) { - if (!empty($this->row['t3ver_oid'])) { + if (isset($this->row['_ORIG_uid'])) { // Make $uid the uid of the versioned record, while $this->row['uid'] is live record uid $uid = (int)$this->row['_ORIG_uid']; }