Project

General

Profile

Actions

Bug #39514

closed

Page preview broken with lockSSL=1/2 and url_scheme=http

Added by Thomas Heilmann over 11 years ago. Updated over 8 years ago.

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

0%

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

Description

In t3lib_BEfunc::getViewDomain, the schema that is used for the preview link is built according to the page's url_scheme setting (but only if a domain record is set for the current page tree!). If lockSSL is set to 1 or 2 at the same time, the workspace frontend preview is broken: The original preview link uses http, which is not changed by Tx_Workspaces_Service_Workspaces->generateWorkspaceSplittedPreviewLink. But as the new preview link points to a backend script (the workspace module), TYPO3 shows a blank page (lockSSL=1) or redirects to the backend interface (lockSSL=2).

I am not quite sure how to write a patch for this issue; I think it would involve changes to t3lib_BEfunc, too, as there is no way to change the url scheme of the preview link via the existing hook. Any ideas?


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemeClosed2012-03-14

Actions
Related to TYPO3 Core - Bug #51687: Page Preview not working with LockSSLPortClosed2013-09-03

Actions
Actions #1

Updated by Alban Cousinie over 11 years ago

This seems to be related to issue http://forge.typo3.org/issues/34820

As stated in the comments of this issue, a regression for preview links has been introduced in TYPO3 4.5.12

Actions #2

Updated by Alban Cousinie over 11 years ago

A workaround I have found to broken page output due to mixing of http and https elements in the source is to adjust the baseurl according to the https status :

##In your constants
BASEURL = http://www.myhost.com/

[globalString = ENV:HTTP_HOST=www.myhost.com] AND [globalString =_SERVER|HTTPS=on]
BASEURL = https://www.myhost.com/
[global]

##In your setup
config.baseURL = {$BASEURL}

Actions #3

Updated by Michael Stucki over 10 years ago

  • Category changed from Bugs to Workspaces
Actions #4

Updated by Michael Stucki over 10 years ago

  • Project changed from 624 to TYPO3 Core
  • Category changed from Workspaces to Workspaces
Actions #5

Updated by Heiko Kromm over 9 years ago

What about changing these in TYPO3\CMS\Backend\Utility\BackendUtility::getViewDomain($pageId, $rootLine = NULL)

if ($page['url_scheme'] == \TYPO3\CMS\Core\Utility\HttpUtility::SCHEME_HTTPS || $page['url_scheme'] == 0 && GeneralUtility::getIndpEnv('TYPO3_SSL')) {
    $protocol = 'https';
}

to

if ($GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSL'] == 1 ||  $GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSL'] == 2 || $page['url_scheme'] == \TYPO3\CMS\Core\Utility\HttpUtility::SCHEME_HTTPS || $page['url_scheme'] == 0 && GeneralUtility::getIndpEnv('TYPO3_SSL')) {
    $protocol = 'https';
}

Then every preview link is forced to use https if the backend is only available with https.

Actions #6

Updated by Mathias Schreiber about 9 years ago

  • Target version set to 7.5
Actions #7

Updated by Anonymous about 9 years ago

I can confirm this bug in TYPO3 4.5.30

but the behavior is weird...

Setup for baseUrl:

pageBase = http://www.mydomain.de/

[globalString = ENV:HTTPS=on]
    pageBase = https://www.mydomain.de/
[end]

[globalString = ENV:HTTP_HOST=cms.mydomain.de]
  pageBase = http://cms.mydomain.de/cms/
[end]

[globalString = ENV:HTTP_HOST=cms.mydomain.de] && [globalString = ENV:HTTPS=on]
        pageBase = https://cms.mydomain.de/cms/
[end]

the Backend is reached with https://cms.mydomain.de/cms/typo3/backend.php

in WORKSPACE preview this is set in the sourcecode:

<base href="https://cms.mydomain.de/cms/"></base>

which is correct, but all Links are generated like:

<a href="http://www.mydomain.de/some/path.html"></a>

Those links are not clickable in the browser.

Actions #8

Updated by Oliver Hader over 8 years ago

  • Status changed from New to Needs Feedback
  • Priority changed from Must have to Should have
  • Target version changed from 7.5 to 7 LTS
  • Is Regression set to No

That was solved for TYPO3 CMS 6.2 with issue #61699 please check again.
At the time of the last update to this ticket, TYPO3 CMS 4.5 was almost end of live with 4.5.40

Actions #9

Updated by Riccardo De Contardi over 8 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.
You could also join the #typo3-cms channel in Slack if you still need support.
Thank you

Actions

Also available in: Atom PDF