Bug #89739

Omit hostname in site auto-generation called via CLI

Added by Oliver Hader 16 days ago. Updated 16 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2019-11-22
Due date:
% Done:

100%

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

Description

Invoking DataHandler in CLI (e.g. when importing data-sets) fails due to flaws in CreateSiteConfiguration which uses $_SERVER as fallback even when it does not contain any web-related information. Thus, hostname and schema prefix is omitted when being called in CLI context.

InvalidArgumentException : The parsedUri "http:///Users/olly/Development/typo3/master/vendor/phpunit/phpunit/autogenerated-1000" appears to be malformed
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/Http/Uri.php:123
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/Http/Uri.php:109
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/Site/Entity/Site.php:103
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/Utility/GeneralUtility.php:3461
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/Configuration/SiteConfiguration.php:132
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/Configuration/SiteConfiguration.php:83
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/Site/SiteFinder.php:55
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/Utility/GeneralUtility.php:3461
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/DataHandling/SlugHelper.php:306
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/DataHandling/SlugHelper.php:359
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/DataHandling/DataHandler.php:1877
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/DataHandling/DataHandler.php:1616
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/DataHandling/DataHandler.php:1572
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/DataHandling/DataHandler.php:1433
 /Users/olly/Development/typo3/master/typo3/sysext/core/Classes/DataHandling/DataHandler.php:1065

Related issues

Related to TYPO3 Core - Feature #89142: Create sites when a page in generated on root level Resolved 2019-09-11

Associated revisions

Revision 10023893 (diff)
Added by Oliver Hader 16 days ago

[BUGFIX] Omit hostname in site auto-generation called via CLI

Invoking DataHandler in CLI (e.g. when importing data-sets) fails
due to flaws in CreateSiteConfiguration which uses $_SERVER as
fallback even when it does not contain any web-related information.

Thus, hostname and schema prefix is omitted when being called in
CLI context.

Releases: master
Resolves: #89739
Change-Id: Ic8d3e5d4dd81067f2be3fa1d092c180885ba1783
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62370
Reviewed-by: Daniel Goerz <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Susanne Moog <>
Tested-by: TYPO3com <>
Tested-by: Andreas Fernandez <>
Tested-by: Susanne Moog <>

History

#1 Updated by Oliver Hader 16 days ago

  • Related to Feature #89142: Create sites when a page in generated on root level added

#2 Updated by Gerrit Code Review 16 days ago

  • Status changed from New 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/c/Packages/TYPO3.CMS/+/62370

#3 Updated by Oliver Hader 16 days ago

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

Also available in: Atom PDF