http://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692012-03-14T09:50:08ZTYPO3 ForgeTYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1067352012-03-14T09:50:08ZChristian Nöllechristian.noelle@typo3.org
<ul></ul><p>To clarify: None of the pages is configured using https scheme in BE.</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1067372012-03-14T10:01:49ZOliver Haderoliver.hader@typo3.org
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Needs Feedback</i></li><li><strong>PHP Version</strong> set to <i>5.3</i></li></ul><p>Did that work before the release of TYPO3 4.5.12 (which initially introduced the first regression on the preview link) - so how did it behave in TYPO3 4.5.11?</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1067382012-03-14T10:04:37ZChristian Nöllechristian.noelle@typo3.org
<ul></ul><p>Yes, did work in 4.5.12 and prior.</p>
<p>Behaviour was: Preview link used the BE domain (with https/port scheme), first click on a link switched over to the domain respecting the domain record of the particular page (non https).</p>
<p>Note: the BE domain does not own a domain record in T3.</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1067492012-03-14T10:27:35ZPhilipp Gampephilipp.gampe@typo3.org
<ul></ul><p>@Oli IMHO this is a big blocker in case a server does not offer HTTPS on other domains at all!</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1067612012-03-14T11:26:32ZOliver Haderoliver.hader@typo3.org
<ul></ul><p>@Christian: I see the problem, so basically your scenario defines a (valid) special case which requires an additional TSconfig property like "options.view.currentDomain" or "options.view.currentDomainIfUndefined" - thus, if your special "backend.domain.com" is not available in sys_domains, the current one is used</p>
<p>@Philipp: Is this the case, that HTTPS is not working at all?</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1067652012-03-14T11:36:57ZChristian Nöllechristian.noelle@typo3.org
<ul></ul><p>Mh, well, that could be a solution. But wouldn't it be better to respect the http/https settings in page settings for a root (and sub-) pages of a website?</p>
<p>Concerning the comment of Philipp: Possible. Let me explain our setup a bit further: We are maintaining serveral backends on one (sort of ;)) machine using NameVirtualHosts from Apache. All BEs have SSL configured. To work around the issue of certificates missmatch, each VirtualHost (eg BE) has it's own SSL-Port (Restriction of NameVirtualHosts and many certs).</p>
<p>So <a class="external" href="https://backend_1.foo.bar:1234">https://backend_1.foo.bar:1234</a> holds the domain for bar.foo. Preview will generate a link as <a class="external" href="https://bar.foo">https://bar.foo</a> (which will translate to <a class="external" href="https://bar.foo:443">https://bar.foo:443</a>) But on port 443 a totally different host ist listing. Two problems: First the user is presented a certificate warning (as cert of different host is presented), second - if cert is accepted - user is getting a server error.</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1068032012-03-14T15:11:16ZPhilipp Gampephilipp.gampe@typo3.org
<ul></ul><p>Well, what I have in mind is this:</p>
<p>A backend at backend.example.org with SSL.<br />A domain record for frontent.example.org without SSL. That means the webserver does not support SSL and no service is listening on port 443.</p>
<p>So if the preview link now point to the <a class="external" href="https://frontent.example.org/">https://frontent.example.org/</a>, the user will get a server error or even "there is nothing" from his browser.</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1068192012-03-14T15:51:18ZChristian Nöllechristian.noelle@typo3.org
<ul></ul><p>Yep, right. And as a surplus, we have the ports - set via conf vars - which should be respected as well.</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1091992012-03-28T14:54:44ZChristian Nöllechristian.noelle@typo3.org
<ul></ul><p>Mh, with the release of 4.5.14 this is getting worse. As 4.5.14 is a security release, but https is not working correctly.</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1132432012-04-20T11:41:41ZFlorian Seirerflorian.seirer@tirol.gv.at
<ul></ul><p>We have a similar setup, and I can confirm this behaviour.</p>
<p>I used the old version from <a class="external" href="https://review.typo3.org/#/c/9317/3/t3lib/class.t3lib_befunc.php">https://review.typo3.org/#/c/9317/3/t3lib/class.t3lib_befunc.php</a>, and page previewing works again.</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1176622012-05-23T10:31:49ZSybille Peterssypets@gmx.de
<ul></ul><p>We have a similar problem (see <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Changed domain handling on "View webpage" from backend causes problems (Closed)" href="http://forge.typo3.org/issues/36542">#36542</a>) and I have patched class.t3lib_befunc.php in 4.5.15 update. But in the long run, this is not a good solution. Also, we soon plan to update to 4.6.</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1198082012-06-13T15:09:02ZFlorian Seirerflorian.seirer@tirol.gv.at
<ul></ul><p>To get rid of this behaviour in 4.7.1, replace the function getViewDomain (class.t3lib_befunc.php, starting line 2647) with the following code.<br />Not sure if this is the best way to fix this issue, though.</p>
<p>public static function getViewDomain($pageId, $rootLine = NULL) {<br /> $domain = rtrim(t3lib_div::getIndpEnv('TYPO3_SITE_URL'), '/');<br /> if (!is_array($rootLine)) {<br /> $rootLine = self::BEgetRootLine($pageId);<br /> }<br /> // checks alternate domains<br /> if (count($rootLine) > 0) {<br /> $urlParts = parse_url($domain);<br /> if (self::getDomainStartPage($urlParts['host'], $urlParts['path'])) {<br /> /** @var t3lib_pageSelect $sysPage */<br /> $sysPage = t3lib_div::makeInstance('t3lib_pageSelect');<br /> $page = (array)$sysPage->getPage($pageId);<br /> $protocol = 'http';<br /> if ($page['url_scheme'] t3lib_utility_Http::SCHEME_HTTPS || ($page['url_scheme'] 0 && t3lib_div::getIndpEnv('TYPO3_SSL'))) {<br /> $protocol = 'https';<br /> }<br /> $domain = $protocol . '://' . self::firstDomainRecord($rootLine);<br /> }<br /> }<br /> return $domain;<br />}</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1224122012-07-04T12:47:54ZChristian Nöllechristian.noelle@typo3.org
<ul></ul><p>Well, yes, that is the old code, we use this as well right at the moment. I try to dig into this next week, try to create a patch for the new code, as this issue gets no publicity from core maintainers. Maybe some poorly coded code from me can get this going... :D</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1232442012-07-09T16:14:46ZAnonymous
<ul></ul><p>The following setup at our site relates to this bug but is independent from https or http:</p>
<p>The backend is reached by:<br /><a class="external" href="http://INTERNAL.host.name/ABC/typo3/backend.php">http://INTERNAL.host.name/ABC/typo3/backend.php</a></p>
<p>or https, it doesnt matter, because its only internal accessible.</p>
<p>The frontend (the regular webpage) URL is:<br /><a class="external" href="http://EXTERNAL.host.name/ABC/index.php?id=1">http://EXTERNAL.host.name/ABC/index.php?id=1</a></p>
<p>Again https would also work as all pages can be viewed using https.</p>
<p>Clicking in "View Webpage" in the backend will open the URL without the necessary part ABC:<br /><a class="external" href="http://EXTERNAL.host.name/index.php?id=1">http://EXTERNAL.host.name/index.php?id=1</a></p>
<p>As a temporary solution to this behaviour I reactivated the old version (4.5.11) of class.t3lib_befunc.php</p>
<p>Please put this up on the priority list as next update will have the same negative effect on my installation. Thanx in advance.</p>
<p>Oli</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1546712013-03-15T13:47:06ZJörg Vellettijvelletti@allplan.com
<ul></ul><p>For us it was the same Problem:</p>
<p>we have a multi Domain tree, one of them with https, the others ONLY with http.<br />Backend only available via https.</p>
<p>eavry preview link from a backend page to frontend ends up to a https URL on both pagetrees, as all pages are created in the past with URL_scheme = 0</p>
<p>.....................................<br />*i solved it this way: *</p>
<p>Set URL_Scheme of the ROOT Page of the spezific domain tree to: 1 (= "http://") insted of "0" = (unknown)<br />AND<br />changed the line: <br /><pre>
$protocol = 'https';
</pre></p>
<p>against this 4 lines:<br /><pre>
$rootpage = (array)$sysPage->getPage($rootLine[1]['uid']);
if ( $rootpage['url_scheme'] == 0 || $rootpage['url_scheme'] == t3lib_utility_Http::SCHEME_HTTPS ) {
$protocol = 'https';
}
</pre></p>
<p>with this solution i can force https on each page separately by page properties OR set a default on rootpage ID</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1621692013-05-01T23:04:45ZMichael Stuckimichael.stucki@typo3.org
<ul><li><strong>Status</strong> changed from <i>Needs Feedback</i> to <i>Accepted</i></li><li><strong>Complexity</strong> set to <i>hard</i></li></ul><p>Will need to look at this.</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1623172013-05-02T15:49:00ZJörg Vellettijvelletti@allplan.com
<ul></ul><p>@michi</p>
<p>sorry but i think the complexity is not so hard. for any questions you can contact me (in german or english) <br /><a class="external" href="http://forge.typo3.org/users/37422">http://forge.typo3.org/users/37422</a><br />and with some luck in the next 2 weeks i will get setup gerrit working to push my changes directly ..</p>
<p>or see the full changed function below</p>
<pre>
public static function getViewDomain($pageId, $rootLine = NULL) {
$domain = rtrim(t3lib_div::getIndpEnv('TYPO3_SITE_URL'), '/');
if (!is_array($rootLine)) {
$rootLine = self::BEgetRootLine($pageId);
}
// checks alternate domains
if (count($rootLine) > 0) {
$urlParts = parse_url($domain);
/** @var t3lib_pageSelect $sysPage */
$sysPage = t3lib_div::makeInstance('t3lib_pageSelect');
$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'))) {
// j.v.: get url_scheme of Rootpage if actual page Settings url_scheme is 0 = undefined
$rootpage = (array)$sysPage->getPage($rootLine[1]['uid']);
// only change protokol to https if also on rootpage 'url_scheme' is set to https or is also undefinied like on actual page ..
if ( $rootpage['url_scheme'] == 0 || $rootpage['url_scheme'] == t3lib_utility_Http::SCHEME_HTTPS ) {
$protocol = 'https';
}
// --- j.v. end of changes ..
}
$domainName = self::firstDomainRecord($rootLine);
if ($domainName) {
$domain = $domainName;
} else {
$domainRecord = self::getDomainStartPage($urlParts['host'], $urlParts['path']);
$domain = $domainRecord['domainName'];
}
if ($domain) {
$domain = $protocol . '://' . $domain;
} else {
$domain = rtrim(t3lib_div::getIndpEnv('TYPO3_SITE_URL'), '/');
}
}
return $domain;
}
</pre> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1758942013-07-31T20:24:23ZMichael Stuckimichael.stucki@typo3.org
<ul></ul><p>Hello Jörg,</p>
<p>apparently, both of us didn't manage to continue with this issue...<br />Do you need any help in getting your Git environment to work? Let me know.</p>
<p>Greetings, Michael</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1782642013-08-20T15:27:27ZChristian Nöllechristian.noelle@typo3.org
<ul></ul><p>Well, this should work, tested, but I got an logical error in that:</p>
<pre>
// only change protokol to https if also on rootpage 'url_scheme' is set to https or is also undefinied like on actual page ..
if ( $rootpage['url_scheme'] == 0 || $rootpage['url_scheme'] == t3lib_utility_Http::SCHEME_HTTPS ) {
$protocol = 'https';
}
</pre>
<p>Why should I change to https when nothing is defined? It should only switch the protocol if:</p>
<ol>
<li>the rootpage or </li>
<li>any other page I like to preview has https enabled</li>
</ol>
<p>If there is no https enabled at the root page (or simply not selected) the above would switch to https, which would lead to same confusion as before.</p>
<pre>
if ( $rootpage['url_scheme'] == t3lib_utility_Http::SCHEME_HTTPS ) {
$protocol = 'https';
}
</pre>
<p>would be better for the rootpage. But it does not cover the case if rootpage is not-SSL and any subpage has SSL switched on? Or am I wrong?</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=1803922013-09-02T12:48:51ZJörg Vellettijvelletti@allplan.com
<ul></ul><p>HI Christian</p>
<p>thanks for working on that issue and sorry for the late response as i was in vacation. To your question:</p>
<p>maybe there is still an issue for other enviroinments and after think about your remarks, i think "this" below will fit for all</p>
<pre>
$protocol = 'http';
if ($page['url_scheme'] == t3lib_utility_Http::SCHEME_HTTPS ) {
// actual subpage Needs SSL, so we set it
$protocol = 'https';
} else if ($page['url_scheme'] == 0 && t3lib_div::getIndpEnv('TYPO3_SSL') ) {
// actual Subpage has undefined scheme, but backend is using SSL so verify, if we need to set it
$rootpage = (array)$sysPage->getPage($rootLine[1]['uid']);
// only change protokol to https if also on rootpage 'url_scheme' is set to https
if ( rootpage['url_scheme'] == t3lib_utility_Http::SCHEME_HTTPS ) {
$protocol = 'https';
}
}
</pre>
<p>this will Our Needs, will not conflict with the Original settings before my changes and gives the redateur all possabilities he needs: <br />if backend is using SSL as it should be, the redakteur can set it for the subpages as he needs or if he does not need SSL just set it ONCE on Root page. only issue is left:</p>
<p>if he needs SSL on all Subpages but not on the Root page, then he needs to set SSL on all Subpages ...<br />but this can also be done by htaccess ...</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=2005772014-01-23T12:06:08ZGeorg Tiefenbrunngeorg.tiefenbrunn@gmail.com
<ul></ul><p>Hi Jörg!</p>
<p>I tried your solution and found that <code>$rootpage = (array)$sysPage->getPage($rootLine[1]['uid']);</code> does not check if 'is_siteroot' is set on a parent page. That's necessary for multidomain sites. Imagine following pagetree</p>
<pre>
TYPO3-Site (uid=0)
+ Websites (uid=1)
+ Website A (uid=2)
+ Page A1 (uid=3)
+ Page A2 (uid=4)
+ ...
+ Website B (uid=5)
+ Page B1 (uid=6)
+ ...
</pre>
<p>Both websites use the same BE-url with SSL. 'is_siteroot' is set for pages uid 2 and 5. If Website A should use https and Website B normal http, 'url_scheme' for Website A (uid=2) must be set to 2 (https). If Page A2 (uid=4) is viewed, the use of https should be inherited from page uid=2.</p>
<p>I have no experience in TYPO3 BE coding and don't know if this could be achieved by the clause-param of function BEgetRootLine(). But as function getViewDomain() has an optional parameter $rootLine I decided to simply loop through the parent pages. My changes for 6.1.7 in <code>typo3/sysext/backend/Classes/Utility/BackendUtility.php</code><br /><pre>
- if ($page['url_scheme'] == \TYPO3\CMS\Core\Utility\HttpUtility::SCHEME_HTTPS || $page['url_scheme'] == 0 && \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SSL')) {
- $protocol = 'https';
- }
+ if ($page['url_scheme'] == \TYPO3\CMS\Core\Utility\HttpUtility::SCHEME_HTTPS) {
+ // 'url_scheme' of page is explicitly set to SSL
+ $protocol = 'https';
+ } else if ($page['url_scheme'] == 0 && \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SSL')) {
+ // page has undefined 'url_scheme' and BE is using SSL: verify, if we need to set https
+ $rootPageUid = 0;
+ // if 'is_siteroot' is set on a parent page, use it as rootPage
+ foreach ($rootLine as $pageData) {
+ if ($pageData['is_siteroot'] == TRUE) {
+ $rootPageUid = $pageData['uid'];
+ break;
+ }
+ }
+ $rootPage = (array) $sysPage->getPage($rootPageUid);
+ // only change protocol to https if 'url_scheme' is set to https on rootPage
+ if ($rootPage['url_scheme'] == \TYPO3\CMS\Core\Utility\HttpUtility::SCHEME_HTTPS) {
+ $protocol = 'https';
+ }
+ }
</pre></p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=2005832014-01-23T12:54:13ZJörg Vellettijvelletti@allplan.com
<ul></ul><p>Hi george</p>
<p>As i still stuck in 4.5.x LTS i just can say : thanks for porting this to 6.1. .. Your Solution looks fine for me.</p>
<p>But just to understand your Problem:</p>
<p>what page is delivered on your system if you are on uid 3 with: <br />$rootpage = (array)$sysPage->getPage($rootLine<sup><a href="#fn1">1</a></sup>['uid']);</p>
<p>is it uid 1 or uid 2 ?</p>
<p>i actually cant test your script because our domain setup is like this:</p>
<pre>
TYPO3-Site (uid=0)
+ Website A (uid=2) multilingual Single Tree with http Domains with .de .com .fr etc ...
+ Page A1 (uid=3)
+ Page A2 (uid=4)
+ ...
+ Website B (uid=5) multilingual https Domain with .com/de .com/en .com/fr etc .. = used for SSL backend
+ Page B1 (uid=6)
+ ...
+ Website C (uid=7)
+ Page C1 (uid=8) multilingual https sub Domain with .com/de .com/en .com/fr etc ..
+ ...
</pre><br />so i will always get correctly :<br />uid 2 if on page 3 or 4, <br />uid 5 on uid 6 <br />and uid 7 on uid 8
<p>you can also contact me directly via email jVelletti [ at] nemetschek.com (in german or if needed in englisch)</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=2005872014-01-23T13:31:19ZGeorg Tiefenbrunngeorg.tiefenbrunn@gmail.com
<ul></ul><p>Hi Jörg!</p>
<p>I just rechecked everything on my setup. It's something like:</p>
<pre>
TYPO3-Site (uid=0)
+ Root (uid=200)
+ Global Records (uid=100)
+ Categories
+ Media
+ ...
+ Websites (uid=1)
+ Website A (uid=2)
+ Page A1 (uid=3)
+ Page A2 (uid=4)
+ ...
+ Website B (uid=5)
+ Page B1 (uid=6)
+ ...
+ Website C (uid=7)
+ Page C1 (uid=8)
+ ...
</pre>
<p>So I have two extra levels. Nevertheless <code>$rootpage = (array)$sysPage->getPage($rootLine[1]['uid']);</code> always returns uid 200 (Root). Seems as if this is an 6.x isue.</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=2378932014-11-28T08:57:42ZChristian Nöllechristian.noelle@typo3.org
<ul></ul><p>Is there any news on this issue...Still patching manually... :/</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=2437582015-01-08T15:28:30ZSybille Peterssypets@gmx.de
<ul></ul><p>Same here. Still patching manually for 4.5 and working on patch for 6.2.</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=2450002015-01-16T13:40:16ZJan Kornblumjan.kornblum@googlemail.com
<ul></ul><p>A solution where the rootline is beeing respected for the "url_scheme" really would be fine!</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=2588442015-05-14T14:36:59ZWouter Wolterstypo3@wouterwolters.nl
<ul><li><strong>Status</strong> changed from <i>Accepted</i> to <i>Needs Feedback</i></li><li><strong>Is Regression</strong> set to <i>No</i></li></ul><p>Hi, there is an undocumented FEATURE to set an alternative previewDomain in PageTSConfig.</p>
<p>TCEMAIN.viewDomain = example.com</p>
<p>If you have your backend running on https and your frontend not you can specify a protocol in this setting.</p>
<p>TCEMAIN.viewDomain = <a class="external" href="http://example.com">http://example.com</a></p>
<p>Does this solve the problem?</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=2591062015-05-18T13:29:34ZJörg Vellettijvelletti@allplan.com
<ul></ul><p>thanks for the hint, but in my opinion it does not help:</p>
<p>the Function that reads this Value should expect a domainname WITHOUT Protokol (as firstDmianRecord also is stored without Protocol) and at least Domain Name and protocol is copied together.</p>
<p>so your example will generate <a class="external" href="http://http://example.com">http://http://example.com</a> :</p>
<p>see the core code ..</p>
<p>*<strong><b></strong>*</b><strong>**</strong><br />protected function getDomainName($pageId) {<br /> $previewDomainConfig = $GLOBALS['BE_USER']->getTSConfig('TCEMAIN.previewDomain', BackendUtility::getPagesTSconfig($pageId));<br /> if ($previewDomainConfig['value']) {<br /> $domain = $previewDomainConfig['value'];<br /> } else {<br /> $domain = BackendUtility::firstDomainRecord(BackendUtility::BEgetRootLine($pageId));<br /> }</p>
<hr />
<p>protected function getTargetUrl() {<br />... cut some lines ... </p>
<pre><code>// Modify relative path to protocol with host if domain record is given<br /> $protocolAndHost = '..';<br /> if ($domainName) {<br /> $protocol = 'http';<br /> $page = (array) $sysPage->getPage($finalPageIdToShow);<br /> if ($page['url_scheme'] 2 || $page['url_scheme'] 0 && \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SSL')) {<br /> $protocol = 'https';<br /> }<br /> $protocolAndHost = $protocol . '://' . $domainName;<br /> }</code></pre> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=2653872015-07-11T12:02:07ZGerrit Code Review
<ul><li><strong>Status</strong> changed from <i>Needs Feedback</i> to <i>Under Review</i></li></ul><p>Patch set 1 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="http://review.typo3.org/41095">http://review.typo3.org/41095</a></p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=2653962015-07-11T14:08:14ZGerrit Code Review
<ul></ul><p>Patch set 2 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="http://review.typo3.org/41095">http://review.typo3.org/41095</a></p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=2655682015-07-13T12:12:45ZGerrit Code Review
<ul></ul><p>Patch set 1 for branch <strong>TYPO3_6-2</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="http://review.typo3.org/41122">http://review.typo3.org/41122</a></p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=2655752015-07-13T12:30:14ZWouter Wolterstypo3@wouterwolters.nl
<ul><li><strong>Status</strong> changed from <i>Under Review</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="[BUGFIX] Double protocol when using TCEMAIN.previewDomain In EXT:viewpage the option TCEMAIN.pre..." href="http://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/ccf7dae56adaae36f4c0a103f1c7b3c17af8494a">ccf7dae56adaae36f4c0a103f1c7b3c17af8494a</a>.</p> TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https schemehttp://forge.typo3.org/issues/34820?journal_id=3846442018-10-02T12:17:04ZBenni Mackbenni@typo3.org
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul>