Issue Bug Closed

#63930Typolinks don't respect TCEMAIN.previewDomain in multidomain environment

Uwe Trotzek 12/16/14, 14:44 updated 10/02/18, 11:48

Description

Since https://forge.typo3.org/issues/30889 you can define a certain domain for WEB->View and PAGE->View

by setting e.g.
TCEMAIN.previewDomain = previewdomain.com

Unfortunately this isn’t respected in the rendered HTML preview when you have a multidomain setup.

Steps to reproduce:
  • Open backend with backenddomain.com
  • Setup multidomain site
    • multidomain1.com
    • multidomain2.com
  • Configure this PageTSConfig on the root page.
    • TCEMAIN.previewDomain = previewdomain.com
  • Open the preview of a page under e.g. multidomain1.com

The preview will correctly be opened with previewdomain.com but all generated links are prepended with with multidomain1.com. This causes some problems for example when one closed the backend for certain domains for security reasons.

As I figured out the ContentObjectRender leads to the problem as it simply uses:

$targetDomain = $GLOBALS[‘TSFE’]->getDomainNameForPid($page[‘uid’]);

I’m trying to develop a patch for this. But maybe someone hint or veto ;)

Reviews 2