Skip to content

Invalid attempt to create a global request during DataHandler calls from CLI/scheduler #90

@liayn

Description

@liayn

[ TYPO3\CMS\Core\Http\InvalidRequestUrlOnCliException ]
Usage of TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals on CLI is discouraged. In case you rely on the method, you have to fake a valid request URL using $_SERVER.

caused by

Exception trace:
#0 ()
vendor/typo3/cms-core/Classes/Http/ServerRequestFactory.php:69
#1 TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals()
vendor/gridelementsteam/gridelements/Classes/DataHandler/ProcessCmdmap.php:42
#2 GridElementsTeam\Gridelements\DataHandler\ProcessCmdmap->__construct()

This happens if you call DataHandler via a command (called via CLI or scheduler).

Do not assume there is a request. Maybe check Environment::isCli() first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions