Project

General

Profile

Actions

Bug #93766

closed

BE user emailMeAtLogin throws TypeError

Added by Stefan Froemken about 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Must have
Category:
Backend User Interface
Target version:
Start date:
2021-03-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Hello,

I have activated emailMeAtLogin in my BE user settings and of cause I have an email address assigned. After log out and log in this TypeError was thrown:

Argument 1 passed to TYPO3\CMS\Core\FormProtection\FormProtectionFactory::getMessageClosure() must be an instance of TYPO3\CMS\Core\Localization\LanguageService, null given, called in /var/www/html/public/typo3/sysext/core/Classes/FormProtection/FormProtectionFactory.php on line 115

Tested on TYPO3 10.4.12 and 10.4.14

I have tried to debug that.

In Middleware\BackendUserAuthenticator we have these lines:

$GLOBALS['BE_USER']->backendCheckLogin($this->isLoggedInBackendUserRequired($pathToRoute));
$GLOBALS['LANG'] = LanguageService::createFromUserPreferences($GLOBALS['BE_USER']);

The upper line will check for first login and tries to send an email. The HTML email is Fluid-based and contains an image titled with "TYPO3 Logo". The ImageServices calls an Image-Task. The Task calls the DeferredBackendImageProcessor. From there the UriBuilder with method buildUriForRoute will be called, which will generate a form token as access to route is not public. The self::getMessageClosure expected $GLOBALS['LANG'] to be of type LanguageService.

But as you see $GLOBALS['LANG'] will be initialized after emailMeAtLogin.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Task #92953: Drop usages of TYPO3_MODE and TYPO3_REQUESTTYPEClosed2020-11-30

Actions
Related to TYPO3 Core - Bug #93133: Not processing images when indexing in SolrClosed2020-12-21

Actions
Related to TYPO3 Core - Bug #93245: Images not processed in Scheduler task since version 10.4.11Closed2021-01-08

Actions
Actions

Also available in: Atom PDF