[BUGFIX] Use correct value for eventPid in DataHandler 57/58857/2
authorBenni Mack <benni@typo3.org>
Tue, 6 Nov 2018 13:51:44 +0000 (14:51 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 6 Nov 2018 14:08:28 +0000 (15:08 +0100)
When using workspaces and the record properties
should be shown, the wrong field (_ORIG_pid instead of
t3ver_oid) is used. This is introduced by
a cleanup patch of mine 1y ago, where an accidental
null coalescense evaluation is used.

Resolves: #86868
Related: #82769
Releases: master
Change-Id: I2505f103608350f37c6bf769de4368b62ed67d55
Reviewed-on: https://review.typo3.org/58857
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Achim Fritz <af@achimfritz.de>
Tested-by: Achim Fritz <af@achimfritz.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index 4f7d6a0..fbe3434 100644 (file)
@@ -7149,7 +7149,7 @@ class DataHandler implements LoggerAwareInterface
             return [
                 'header' => BackendUtility::getRecordTitle($table, $row),
                 'pid' => $row['pid'],
-                'event_pid' => $this->eventPid($table, $row['_ORIG_pid'] ?? $row['uid'], $row['pid']),
+                'event_pid' => $this->eventPid($table, isset($row['_ORIG_pid']) ? $row['t3ver_oid'] : $row['uid'], $row['pid']),
                 't3ver_state' => $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] ? $row['t3ver_state'] : '',
                 '_ORIG_pid' => $row['_ORIG_pid']
             ];