Bug #83586 » PageLayoutView.patch
typo3/sysext/backend/Classes/View/PageLayoutView.php | ||
---|---|---|
$this->contentElementCache[$lP] = [];
|
||
}
|
||
if (count($langListArr) === 1 || $lP === 0) {
|
||
$showLanguage = $expressionBuilder->in('sys_language_uid', [$lP, -1]);
|
||
if ($GLOBALS['BE_USER']->workspace) {
|
||
// if we are in workspace we have to select records of all languages
|
||
$showLanguage = ''; // <- keep empty to select records of all languages
|
||
} else {
|
||
$showLanguage = $expressionBuilder->eq('sys_language_uid', $lP);
|
||
}
|
||
if (count($langListArr) === 1 || $lP === 0) {
|
||
$showLanguage = $expressionBuilder->in('sys_language_uid', [$lP, -1]);
|
||
} else {
|
||
$showLanguage = $expressionBuilder->eq('sys_language_uid', $lP);
|
||
}
|
||
}
|
||
$cList = explode(',', $this->tt_contentConfig['cols']);
|
||
$content = [];
|
||
$head = [];
|
||
// Select content records per column
|
||
$contentRecordsPerColumn = $this->getContentRecordsPerColumn('table', $id, array_values($cList), $showLanguage);
|
||
// Here we have to remove overlayed records which don't belong to current language
|
||
// 1.) record has to be workspace-overlayed
|
||
// 2.) then check if overlayed record belongs to current loop-language "$lP"
|
||
// 3.) if not remove record from $contentRecordsPerColumn
|
||
if ($GLOBALS['BE_USER']->workspace) {
|
||
foreach($contentRecordsPerColumn as $columnId => $records) {
|
||
foreach($records as $key => $record) {
|
||
// 1.) record has to be workspace-overlayed
|
||
BackendUtility::workspaceOL($table, $record, $GLOBALS['BE_USER']->workspace);
|
||
// 2.) then check if overlayed record belongs to current loop-language "$lP"
|
||
if ($record['sys_language_uid'] != $lP) {
|
||
// 3.) if not remove record from $contentRecordsPerColumn
|
||
unset($contentRecordsPerColumn[$columnId][$key]);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
// For each column, render the content into a variable:
|
||
foreach ($cList as $columnId) {
|
||
if (!isset($this->contentElementCache[$lP][$columnId])) {
|