Skip to content

Use [getTSFE() && getTSFE().type == 1617455214] instead of [getTSFE().type == 1617455214] #242

@criwe

Description

@criwe

Describe the bug
Some sites in the Backend can´t be accessed anymore (Extensions, Backend Users), when [getTSFE().type == 1617455214] is used in Setup / Constants.

Environment
TYPO3 version(s): 12.4.19
pdfviewhelpers version: v3.0.0
PHP 8.3

Steps to reproduce
Install pdfviewhelpers, insert typo3script to configure the extension, try to access the "Extensions" page.
An errorpage shows up:

503
Oops, an error occurred!
Unable to get property "type" of non-object "getTSFE()".)

Errorlog says:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: Unable to get property "type" of non-object "getTSFE()". | RuntimeException thrown in file /vendor/symfony/expression-language/Node/GetAttrNode.php in line 86. Requested URL: typo3/module/tools/ExtensionmanagerExtensionmanager?token=--AnonymizedToken--

Expected behavior
Backend should work .

Possible solution
Use [getTSFE() && getTSFE().type == 1617455214] instead of [getTSFE().type == 1617455214] (that works in my case)

(see https://forge.typo3.org/issues/100563)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions