Bug #86140

Legacy backend preview url generation generates URL with duplicated protocol

Added by Benjamin Franzke about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2018-09-04
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When there is no site configuration, no TCEMAN.preview
configuration and no sys_domain record available, BackendUtility::getViewDomain returns a URL like:

http://http://hostname.tld/

This broke due tue the site handling features, probably
with https://review.typo3.org/57949


Related issues

Duplicates TYPO3 Core - Bug #86134: Protocol is added twice to URL in BackendUtility::getViewDomain Closed 2018-09-04

Associated revisions

Revision 62d2f9a3 (diff)
Added by Benjamin Franzke about 1 year ago

[TASK] Rework pseudo-site backend preview url generation

When there is no site configuration, no TCEMAN.preview
configuration and no sys_domain record available, the host
URL needs to be derived from TYPO3_SITE_URL.

This recently broke (and was fixed). Due to wrong logic
the protocol was added twice, resulting in URLs like:

http://http://hostname.tld/

It initially broke due to the site handling features, probably
with https://review.typo3.org/57949
A condition became dead, due to $domain being always set,
when it was null before that change (if a sys_domain record
could not be found).

The bug was fixed by adding an additional condition (without
removing the dead "else" condition) in https://review.typo3.org/c/58177/

This patch tries to clean this up by removing the new condition
(introduced in #58177) and rather restructure the code.

To circumvent those bugs and to avoid confusion what $domain
actually refers to (now always including the protocol) the
code is refactored to not re-assign $domain over and over again.

Change-Id: I155db1b91357bb6345da1ef469d32b0125344b16
Releases: master
Resolves: #86140
Reviewed-on: https://review.typo3.org/58182
Tested-by: TYPO3com <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>
Tested-by: Susanne Moog <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

History

#1 Updated by Andreas Fernandez about 1 year ago

  • Status changed from New to Closed

Thank you for your report.

This issue is already solved with the upcoming 9.4, I will close this ticket as duplicate.

#2 Updated by Andreas Fernandez about 1 year ago

  • Duplicates Bug #86134: Protocol is added twice to URL in BackendUtility::getViewDomain added

#3 Updated by Gerrit Code Review about 1 year ago

  • Status changed from Closed to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58182

#4 Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58182

#5 Updated by Gerrit Code Review about 1 year ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58182

#6 Updated by Susanne Moog about 1 year ago

  • Target version changed from 9.4 to 9 LTS

#7 Updated by Gerrit Code Review about 1 year ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58182

#8 Updated by Benjamin Franzke about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#9 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF