Skip to content
Snippets Groups Projects
Commit 72d6c6e7 authored by Oliver Hader's avatar Oliver Hader Committed by Oliver Hader
Browse files

[BUGFIX] Workspace page previews collide with generated preview links

Workspace page previews collide with that configuration that might have
been set by using a preview link containing a ADMCMD_prev command. The
keyword "IGNORE" is introduced to actually ignore these configurations
when viewing a page from the workspace module.

Resolves: #72225
Releases: master, 7.6, 6.2
Change-Id: I6a73e860a76308028f0a3b1bcd182e41082adcd6
Reviewed-on: https://review.typo3.org/45253


Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: default avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent 2dd7b9c9
Branches
Tags
No related merge requests found
......@@ -152,8 +152,8 @@ class PreviewHook implements \TYPO3\CMS\Core\SingletonInterface
public function getPreviewConfiguration()
{
$inputCode = $this->getPreviewInputCode();
// If inputcode is available, look up the settings
if ($inputCode) {
// If input code is available and shall not be ignored, look up the settings
if ($inputCode && $inputCode !== 'IGNORE') {
// "log out"
if ($inputCode == 'LOGOUT') {
setcookie($this->previewKey, '', 0, GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'));
......
......@@ -138,11 +138,11 @@ class PreviewController extends AbstractController
if (\TYPO3\CMS\Workspaces\Service\WorkspaceService::isNewPage($this->pageId)) {
$wsNewPageUri = $uriBuilder->uriFor('newPage', array(), \TYPO3\CMS\Workspaces\Controller\PreviewController::class, 'workspaces', 'web_workspacesworkspaces');
$wsNewPageParams = '&tx_workspaces_web_workspacesworkspaces[controller]=Preview';
$this->view->assign('liveUrl', $wsSettingsPath . $wsNewPageUri . $wsNewPageParams);
$this->view->assign('liveUrl', $wsSettingsPath . $wsNewPageUri . $wsNewPageParams . '&ADMCMD_prev=IGNORE');
} else {
$this->view->assign('liveUrl', $wsBaseUrl . '&ADMCMD_noBeUser=1');
$this->view->assign('liveUrl', $wsBaseUrl . '&ADMCMD_noBeUser=1&ADMCMD_prev=IGNORE');
}
$this->view->assign('wsUrl', $wsBaseUrl . '&ADMCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS=' . $GLOBALS['BE_USER']->workspace);
$this->view->assign('wsUrl', $wsBaseUrl . '&ADMCMD_prev=IGNORE&ADMCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS=' . $GLOBALS['BE_USER']->workspace);
$this->view->assign('wsSettingsUrl', $wsSettingsUrl);
$this->view->assign('backendDomain', GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY'));
$splitPreviewTsConfig = BackendUtility::getModTSconfig($this->pageId, 'workspaces.splitPreviewModes');
......
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