Skip to content
This repository was archived by the owner on Nov 19, 2017. It is now read-only.

Commit 9fd9c56

Browse files
author
tolleiv
committed
Fixed bug #8897: Backend cannot render images when page only exists in draft workspace
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/imagemap_wizard/trunk@42446 735d13b6-9817-0410-8766-e36946ffe9aa
1 parent 2510dd8 commit 9fd9c56

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

classes/model/class.tx_imagemapwizard_model_typo3env.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,15 @@ public function initTSFE($pid = 1, $ws = 0) {
7777
//$GLOBALS['TSFE']->sys_page->init($GLOBALS['TSFE']->showHiddenPage);
7878
$GLOBALS['TSFE']->sys_page->init(true);
7979
$page = $GLOBALS['TSFE']->sys_page->getPage($pid);
80-
if (count($page) == 0) {
81-
$GLOBALS['TYPO3_DB']->debugOutput = $sqlDebug;
82-
$this->lastError = "Error(" . __LINE__ . ") [ Unable to find the requested host-page ]:" . $sqlDebug;
83-
return false;
80+
if (count($page) == 0 && $GLOBALS['BE_USER']->workspace != 0) {
81+
$GLOBALS['TSFE']->sys_page->versioningPreview = TRUE;
82+
$wsRec = t3lib_beFunc::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, 'pages', $pid);
83+
$page = $GLOBALS['TSFE']->sys_page->getPage($wsRec['uid']);
84+
if (count($page) == 0) {
85+
$GLOBALS['TYPO3_DB']->debugOutput = $sqlDebug;
86+
$this->lastError = "Error(" . __LINE__ . ") [ Unable to find the requested host-page ]:" . $sqlDebug;
87+
return false;
88+
}
8489
}
8590
if ($page['doktype'] == 4 && count($GLOBALS['TSFE']->getPageShortcut($page['shortcut'], $page['shortcut_mode'], $page['uid'])) == 0) {
8691
$GLOBALS['TYPO3_DB']->debugOutput = $sqlDebug;

0 commit comments

Comments
 (0)