Bug #23115
closed
Workspace preview does not work in multidomain setup
Added by Christian Schneider over 14 years ago.
Updated almost 7 years ago.
Description
The setup and problem of my typo3 installation is much like the one described here: http://bugs.typo3.org/view.php?id=3976
But in version 4.4 I get "correct" url's for the preview - the pages are found. But pages from a different domain are shown as live version only (two times), where one should be the workspace version. Preview works only for pages on the same domain like the backend.
Example:
- login to domainA.com
- preview works for pages below domainA.com
- preview does not work for pages below domainB.com in the same typo3
Maybe this is related to the cookie problem mentioned in the comments of #16429 as well?
(issue imported from #M15025)
Files
The example, of course, applies vice versa as well:
- login to domainB.com
- preview does not work for pages below domainA.com in the same typo3
- preview works for pages below domainB.com
Hey, I've found a workaround:
- login to domainC.com
- preview works for pages below domainA.com
- preview works for pages below domainB.com
Isn't that strange? :)
--> no problem if the current domain does not have a domain record in the typo3 tree
Hi, I have the same problem in TYPO3 4.6.8. I solved by editing the t3lib/t3lib_befunc.php e changing how it creates the preview link:
BEFORE:
$viewDomain = self::getViewDomain($pageUid, $rootLine);
AFTER:
$viewDomain = rtrim(t3lib_div::getIndpEnv('TYPO3_SITE_URL'), '/');
See attacched patch.
For me it works fine.
- Description updated (diff)
- Status changed from New to Needs Feedback
- Is Regression set to No
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.9)?
- TYPO3 Version changed from 4.4 to 6.2
ON TYPO3 6.2.12 the line:
$viewDomain = self::getViewDomain($pageUid, $rootLine);
Is still present inside /typo3/sysext/backend/Classes/Utility/BackendUtility.php, line 2772
Hi, there is an undocumented FEATURE to set an alternative previewDomain in PageTSConfig.
TCEMAIN.viewDomain = example.com
If you have your backend running on https and your frontend not you can specify a protocol in this setting.
TCEMAIN.viewDomain = http://example.com
Does this solve the problem?
Mauro Lorenzutti wrote:
Hi, I have the same problem in TYPO3 4.6.8. I solved by editing the t3lib/t3lib_befunc.php e changing how it creates the preview link:
BEFORE:
$viewDomain = self::getViewDomain($pageUid, $rootLine);
AFTER:
$viewDomain = rtrim(t3lib_div::getIndpEnv('TYPO3_SITE_URL'), '/');
See attacched patch.
For me it works fine.
I'm running Typo3 6.2.9 and there is a same problem which is not quote consistent.
Actually this patch is fixing the problem as I can see. Not clear from my perspective why is it so, but it does the job.
So I was wondering is someone gonna fix this properly and include it in some of the next versions?
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/41095
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/41095
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/41122
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF