Review main Merged

58182[TASK] Rework pseudo-site backend preview url generation

Benjamin Franzke CR +2 V +2 Easy +7 −12 updated 09/07/18, 19:03

Commit message

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.

Review

  • Code review CR +2
    • Anja Leichsenring +2
    • Georg Ringer +1
    • Andreas Kienast +1
    • Susi Moog +1
  • Verified V +2
    • Anja Leichsenring +2
    • Georg Ringer +1
    • Andreas Kienast +1
    • Susi Moog +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 1216

  1. Benjamin Franzke uploaded patch set 1 09/04/18, 12:19

  2. TYPO3com voted on patch set 1 V -1 09/04/18, 12:19 Completed build in 09s on Tue, 4 Sep, 02:19 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27766

  3. Benjamin Franzke commented on patch set 1 09/04/18, 12:26

    Ok, seems this was fixed by https://review.typo3.org/c/58177/ in the meantime. Still I think this this version might be a bit better due tue not relying on an additional parse_url(). Will push a rebased variant marked as [TASK]
  4. Benjamin Franzke uploaded patch set 2 09/04/18, 12:29

  5. Benjamin Franzke updated the commit message in patch set 3 09/04/18, 12:45

  6. TYPO3com voted on patch set 2 V +1 09/04/18, 12:49 Completed build in 18m 23s on Tue, 4 Sep, 02:49 PM Test Summary: 35980 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27770

  7. TYPO3com voted on patch set 3 V +1 09/04/18, 12:55 Completed build in 10m 03s on Tue, 4 Sep, 02:55 PM Test Summary: 35980 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27772

  8. Andreas Kienast voted on patch set 3 V +1 CR +1 09/07/18, 16:48

  9. Susi Moog updated the commit message in patch set 4 09/07/18, 16:51

  10. TYPO3com voted on patch set 4 V +1 09/07/18, 17:03 Completed build in 12m 12s on Fri, 7 Sep, 07:03 PM Test Summary: 35863 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27876

  11. Susi Moog voted on patch set 4 CR +1 09/07/18, 18:55

  12. Georg Ringer voted on patch set 4 V +1 CR +1 09/07/18, 18:58

  13. Susi Moog voted on patch set 4 V +1 09/07/18, 18:59

  14. Andreas Kienast voted on patch set 4 V +1 CR +1 09/07/18, 19:03

  15. Anja Leichsenring voted on patch set 4 V +2 CR +2 09/07/18, 19:03

  16. Anja Leichsenring merged patch set 5 09/07/18, 19:03