Bug #93766

BE user emailMeAtLogin throws TypeError

Added by Stefan Froemken about 2 months ago. Updated 26 days ago.

Status:
Resolved
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

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 SolrResolved2020-12-21

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

Actions
#1

Updated by Stefan Froemken about 2 months ago

  • Related to Task #92953: Drop usages of TYPO3_MODE and TYPO3_REQUESTTYPE added
#2

Updated by Gerrit Code Review about 2 months ago

  • Status changed from New to Under Review

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68494

#3

Updated by Stefan Froemken about 2 months ago

  • Assignee set to Stefan Froemken
  • Complexity set to easy

Problem is already solved in v11. See related issue.

#4

Updated by Gerrit Code Review about 2 months ago

Patch set 2 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68494

#5

Updated by Daniel Goerz about 2 months ago

  • Related to Bug #93133: Not processing images when indexing in Solr added
#6

Updated by Daniel Goerz about 2 months ago

  • Related to Bug #93245: Images not processed in Scheduler task since version 10.4.11 added
#7

Updated by Gerrit Code Review about 2 months ago

Patch set 3 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68494

#8

Updated by Gerrit Code Review about 2 months ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68518

#9

Updated by Gerrit Code Review 26 days ago

Patch set 2 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68518

#10

Updated by Helmut Hummel 26 days ago

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

Also available in: Atom PDF