Project

General

Profile

Actions

Bug #102188

open

FLUIDTEMPLATE with set extbase.controllerExtensionName not resolve extension name inside f:translate

Added by Oliver Pfaff 7 months ago. Updated 7 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Documentation
Target version:
-
Start date:
2023-10-17
Due date:
% Done:

0%

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

Description

The docs says in FLUIDTEMPLATE (cObject):

extbase.controllerExtensionName:

Sets the extension name of the controller.

*Tip

Setting this allows you to skip the extensionName argument for the f:translate and the f:uri.resource ViewHelpers.

This requires you to put translations and public images in the usual paths in your extension.*

The tip seems not to work anymore in TYPO3 13.

When we have a setup like:

page = PAGE
page.10 = FLUIDTEMPLATE
page.10 {
extbase.controllerExtensionName = extensionKey
...

the request is not a instance of ExtbaseRequestInterface so we get RuntimeException 1639828178 in f:translate

Actions #1

Updated by Stefan Bürk 7 months ago

You can use following changes to mitigate this, unrelated to the context:

For the `f:uri.resource` ViewHelper set the extensionKey in the ViewHelper:

<link href="{f:uri.resource(path:'Css/Stylesheet.css', extensionName: 'AnotherExtension')}" rel="stylesheet" />

and for the translate viewhelper use the LLL sytax along with the EXT

<f:translate key="LLL:EXT:myext/Resources/Private/Language/locallang.xlf:key1" />

additional comments

@Christian Kuhn tried to work on the translate viewhelper to relax it a bit, but hit some burden - not sure about the current state. Still, a ReST file is missing explaining this and other ViewHelper quirks.

Actions

Also available in: Atom PDF