Skip to content

Commit

Permalink
[BUGFIX] Workspace page previews collide with generated preview links
Browse files Browse the repository at this point in the history
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: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
  • Loading branch information
ohader committed Mar 6, 2016
1 parent 2dd7b9c commit 72d6c6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions typo3/sysext/version/Classes/Hook/PreviewHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ public function initializePreviewUser(&$params, &$pObj)
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'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ public function indexAction($previewWS = null)
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');
Expand Down

0 comments on commit 72d6c6e

Please sign in to comment.