Bug #23115

Workspace preview does not work in multidomain setup

Added by Christian Schneider over 9 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2010-07-07
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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)

class.t3lib_befunc.php.patch View (832 Bytes) Mauro Lorenzutti, 2012-05-10 16:17


Related issues

Related to TYPO3 Core - Bug #76968: Workspace Preview doesn't work on Multidomain Rootpages Rejected 2016-07-07

Associated revisions

Revision ccf7dae5 (diff)
Added by Wouter Wolters over 4 years ago

[BUGFIX] Double protocol when using TCEMAIN.previewDomain

In EXT:viewpage the option TCEMAIN.previewDomain is used but
not evaluated correctly. The option can contain the protocol
already and this is not respected in EXT:viewpage.

Check if domain already contains a protocol.

Resolves: #34820
Resolves: #36542
Resolves: #23115
Releases: master, 6.2
Change-Id: I13f7cda1dca54d60d350ba460e43ec924c140d35
Reviewed-on: http://review.typo3.org/41095
Reviewed-by: Helmut Hummel <>
Tested-by: Helmut Hummel <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>

Revision b438ca6d (diff)
Added by Wouter Wolters over 4 years ago

[BUGFIX] Double protocol when using TCEMAIN.previewDomain

In EXT:viewpage the option TCEMAIN.previewDomain is used but
not evaluated correctly. The option can contain the protocol
already and this is not respected in EXT:viewpage.

Check if domain already contains a protocol.

Resolves: #34820
Resolves: #36542
Resolves: #23115
Releases: master, 6.2
Change-Id: I13f7cda1dca54d60d350ba460e43ec924c140d35
Reviewed-on: http://review.typo3.org/41122
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Christian Schneider over 9 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

#2 Updated by Christian Schneider over 9 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

#3 Updated by Mauro Lorenzutti almost 8 years ago

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.

#4 Updated by Wouter Wolters about 5 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)?

#5 Updated by Riccardo De Contardi almost 5 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

#6 Updated by Wouter Wolters almost 5 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?

#7 Updated by Dragan Tomic almost 5 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?

#8 Updated by Gerrit Code Review over 4 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

#9 Updated by Gerrit Code Review over 4 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

#10 Updated by Gerrit Code Review over 4 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

#11 Updated by Wouter Wolters over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#12 Updated by Riccardo De Contardi over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF