Project

General

Profile

Actions

Bug #35392

closed

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

Added by Florian Seirer almost 12 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2012-03-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

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 2 (0 open2 closed)

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

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

Actions
Actions #1

Updated by Florian Seirer almost 12 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

Actions #2

Updated by Lorenz Ulrich over 11 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.

Actions #3

Updated by Lorenz Ulrich over 11 years ago

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

Actions #4

Updated by Francois Suter over 11 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.

Actions #5

Updated by Christian Nölle over 11 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

Actions #6

Updated by Mathias Schreiber about 9 years ago

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

Updated by Wouter Wolters almost 9 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?

Actions #8

Updated by Florian Seirer almost 9 years ago

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

Actions #9

Updated by Riccardo De Contardi almost 9 years ago

  • Status changed from Needs Feedback to Closed

Closed upon the request of the reporter.

Actions

Also available in: Atom PDF