Commit 617f0633 authored by Daniel Dorndorf's avatar Daniel Dorndorf Committed by Andreas Fernandez
Browse files

[BUGFIX] Fix record preview

A wrong evaluation of the null coalesce
assignment (?? is evaluted and && later-on),
the if() condition was always true for
any previews of records with versioning
enabled.

The Backend API is used instead.

Resolves: #88356
Releases: master, 9.5
Change-Id: I89ba14bd99bbeb17637b64d99a8d6de265a6e7c4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60758

Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Tymoteusz Motylewski's avatarTymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
parent 2dddd29b
......@@ -835,7 +835,7 @@ class EditDocumentController
}
// Always use live workspace record uid for the preview
if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS'] ?? false && $recordArray['t3ver_oid'] > 0) {
if (BackendUtility::isTableWorkspaceEnabled($table) && $recordArray['t3ver_oid'] > 0) {
$recordId = $recordArray['t3ver_oid'];
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment