Skip to content

Commit

Permalink
[BUGFIX] Check if '_ORIG_uid' really exists in ElementInformationCont…
Browse files Browse the repository at this point in the history
…roller

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 <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
nhovratov authored and lolli42 committed Jul 25, 2023
1 parent 03d5206 commit 414b3e9
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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'];
}
Expand Down

0 comments on commit 414b3e9

Please sign in to comment.