@@ -69,7 +69,7 @@ public function getRecordOverlay($table, $row, $sys_language_content = null, $OL
69
69
$ queryBuilder ->setRestrictions (
70
70
GeneralUtility::makeInstance (FrontendRestrictionContainer::class, $ this ->context )
71
71
);
72
- if ($ this ->versioningWorkspaceId > 0 ) {
72
+ if ($ this ->context -> getPropertyFromAspect ( ' workspace ' , ' id ' , 0 ) > 0 ) {
73
73
// If not in live workspace, remove query based "enable fields" checks, it will be done in versionOL()
74
74
// @see functional workspace test createLocalizedNotHiddenWorkspaceContentHiddenInLive()
75
75
$ queryBuilder ->getRestrictions ()->removeByType (HiddenRestriction::class);
@@ -82,7 +82,9 @@ public function getRecordOverlay($table, $row, $sys_language_content = null, $OL
82
82
// versioned record (e.g. new version) or both (common for modifying, moving etc).
83
83
if ($ this ->hasTableWorkspaceSupport ($ table )) {
84
84
$ queryBuilder ->getRestrictions ()->removeByType (FrontendWorkspaceRestriction::class);
85
- $ queryBuilder ->getRestrictions ()->add (GeneralUtility::makeInstance (WorkspaceRestriction::class, $ this ->versioningWorkspaceId ));
85
+ $ queryBuilder ->getRestrictions ()->add (
86
+ GeneralUtility::makeInstance (WorkspaceRestriction::class,
87
+ $ this ->context ->getPropertyFromAspect ('workspace ' , 'id ' , 0 )));
86
88
$ queryBuilder ->orderBy ('t3ver_wsid ' , 'ASC ' );
87
89
}
88
90
}
0 commit comments