Index: t3lib/class.t3lib_befunc.php =================================================================== --- t3lib/class.t3lib_befunc.php (Revision 7150) +++ t3lib/class.t3lib_befunc.php (Arbeitskopie) @@ -2545,17 +2545,19 @@ } } $preUrl = $preUrl_temp ? (t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://').$preUrl_temp : $backPath.'..'; + + // check if we need to preview a mount point + t3lib_div::requireOnce(PATH_t3lib . 'class.t3lib_page.php'); + $sys_page = t3lib_div::makeInstance('t3lib_pageSelect'); + $sys_page->init(FALSE); + $mountPointInfo = $sys_page->getMountPointInfo($id); + if ($mountPointInfo) { + $id = $mountPointInfo['mount_pid']; + $addGetVars .= '&MP=' . $mountPointInfo['MPvar']; + } + $url = $preUrl.$viewScript.$id.$addGetVars.$anchor; } - - // check if we need to preview a mount point - $sys_page = t3lib_div::makeInstance('t3lib_pageSelect'); - $sys_page->init(FALSE); - $mountPointInfo = $sys_page->getMountPointInfo($id); - if ($mountPointInfo) { - $id = $mountPointInfo['mount_pid']; - $addGetVars .= '&MP=' . $mountPointInfo['MPvar']; - } return "previewWin=window.open('".$url."','newTYPO3frontendWindow');". ($switchFocus ? 'previewWin.focus();' : '');