Bug #16429
closedProblem with workspace preview and multiple sites
0%
Description
I have a site with multiple subdomains, all representing a site in the same TYPO3 installation.
The backend users is allowed to log in from all subdomains, as some of them is allowed to edit multiple sites. It is not possible for me to use the lock-to-domain feature, for the backend groups representing there rights for different subdomains, as I want a user to see all he’s sites next to each other in TYPO3.
The problem:
If a user logs in to TYPO3 through the domain A.example.com/typo3, he can see multiple sites in the backend, lets say pagetrees corresponding to A.example.com and B.example.com.
If the user then wants to preview a page corresponding to the B.example.com branch (when logged in through A.example.com/typo3), from a workspace he sees the page A.example.com in both preview frames.
Problem in code:
In the file typo3/mod/user/ws/wsol_preview.php line 138-144, we have:
$this->URL = array(
'liveHeader' => 'wsol_preview.php?header=live',
'draftHeader' => 'wsol_preview.php?header=draft',
'live' => t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?id='.$pageId.'&L='.$language.'&ADM\
CMD_noBeUser=1',
'draft' => t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?id='.$pageId.'&L='.$language.'&AD\
MCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS='.$this->workspace,
'versionMod' => '../../../sysext/version/cm1/index.php?id='.intval(t3lib_div::_GP('id')).'&diff\
Only=1'
);
Here we see that the links to the two frames is generated with TYPO3_SITE_URL, which is A.example.com when logged in through A.example.com/typo3, and so it is not possible to preview a page from the B.example.com branch of the page tree.
A solution would be to preview with the right domain instead of TYPO3_SITE_URL.
(issue imported from #M3976)
Files