Skip to content
Snippets Groups Projects
Commit 62d2f9a3 authored by Benjamin Franzke's avatar Benjamin Franzke Committed by Anja Leichsenring
Browse files

[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: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent 2fbbda3d
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment