Bug #23115
closedWorkspace preview does not work in multidomain setup
100%
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
Updated by Christian Schneider over 14 years ago
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
Updated by Christian Schneider over 14 years ago
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
Updated by Mauro Lorenzutti almost 13 years ago
- File class.t3lib_befunc.php.patch class.t3lib_befunc.php.patch added
- Target version changed from 0 to 4.6.9
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.
Updated by Wouter Wolters over 10 years ago
- 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)?
Updated by Riccardo De Contardi almost 10 years ago
- 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
Updated by Wouter Wolters almost 10 years ago
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?
Updated by Dragan Tomic almost 10 years ago
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?
Updated by Gerrit Code Review over 9 years ago
- 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
Updated by Gerrit Code Review over 9 years ago
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
Updated by Gerrit Code Review over 9 years ago
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
Updated by Wouter Wolters over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ccf7dae56adaae36f4c0a103f1c7b3c17af8494a.
Updated by Riccardo De Contardi over 7 years ago
- Status changed from Resolved to Closed