Bug #35392

Preview links not working if BE is using SSL and websites aren't

Added by Florian Seirer almost 10 years ago. Updated over 6 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


We have our Backend running under https://www.someinternaldomain.com/subfolder/, which lead to TYPO3 opening preview pages (Web->View) under https://www.someInternalDomain.com/subfolder/index.php?id=1.

After updating from 4.5.11 to 4.5.14 today, the preview pages were no longer working, because TYPO3 opens the preview pages under https://www.theRealDomain.com/index.php?id=1.
This works only if we had SSL certificates for all domains in our TYPO3 installation, which we don't at this moment.

The websites themselves are still running fine under http. It's only the editors who are affected.

Is this a bug or is there an option to revert to the previous behaviour?
Is Bug #31959 (from 4.5.12) related to this?

Related issues

Related to TYPO3 Core - Feature #36542: Changed domain handling on "View webpage" from backend causes problemsClosed2012-04-25

Is duplicate of TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemeClosed2012-03-14


Updated by Florian Seirer almost 10 years ago

To clarify:

What works:
- Viewing a page within the Web/View module
What doesn't work:
- Opening a page via context menu in the page tree
- Opening a page via "Save and view" button

This is still broken(?) in 4.5.15


Updated by Lorenz Ulrich over 9 years ago

I can confirm this. The problem is that the url_scheme is not looked up in the rootline.

Take the following setup:

- www.example.org with url_scheme = 1 (http)
- www.example.org/subpage with url_scheme = default

Now the preview link is generated like this (t3lib_BEfunc::getViewDomain):

$page = (array)$sysPage->getPage($pageId);
$protocol = 'http';
if ($page['url_scheme'] == t3lib_utility_Http::SCHEME_HTTPS || ($page['url_scheme'] == 0 && t3lib_div::getIndpEnv('TYPO3_SSL'))) {
    $protocol = 'https';

The url_scheme is not 2 (https), but only the page being linked to is checked for the URL scheme. So url_scheme is 0 (default) and we're running the backend with SSL: The protocol of the link will be https.

So #31959 improved the situation a bit by using the scheme that is set in the page properties, but it still doesn't consider the rootline.


Updated by Lorenz Ulrich over 9 years ago

Same problem in typo3/sysext/viewpage/view/index.php::main.


Updated by Francois Suter over 9 years ago

Hi Lorenz,

Your idea of looking up the rootline looks like a good solution to this issue. If you can prepare a patch, I'll review it.


Updated by Christian Nölle over 9 years ago

I do not think, that walking the rootline will fix this issue with all implications. See http://forge.typo3.org/issues/34820 for further problems with this issue


Updated by Mathias Schreiber about 7 years ago

  • Target version set to 7.4 (Backend)
  • Is Regression set to No

Updated by Wouter Wolters over 6 years ago

  • Status changed from New to Needs Feedback

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 Florian Seirer over 6 years ago

The problem has been solved, but not with TCEMAIN.viewDomain, iirc.
Anyway, this issue can be closed.


Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Needs Feedback to Closed

Closed upon the request of the reporter.

Also available in: Atom PDF