Skip to content

BUG: Missing site attribute in request with TYPO3 12.4.9 #2145

@jonakieling

Description

@jonakieling

Hi there,

we encounter an exception with Flux 10.0.8 and TYPO3 12.4.9:

Call to a member function getDefaultLanguage() on null

(null is expected to be a site)

Describe the bug
Any use of LocalizationUtility within a Flux template (e.g. f:translate within a configuration section) will lead to the exception.

Additional context

This change in TYPO3 Core uses the request type to decide how to get a locale and uses the requests site attribute for frontend requests: TYPO3/typo3@490f12697b

This is always creating a frontend request with the site attribute missing:
https://github.com/FluidTYPO3/flux/blob/development/Classes/Builder/RequestBuilder.php#L85

To Reproduce
Steps to reproduce the behavior:

  1. Install Flux 10.0.8 and TYPO3 12.4.9
  2. Have a provider Extension registered
  3. Create a Flux Element with a f:translate ViewHelper in the configuration section
  4. Load Page module

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions