Project

General

Profile

Actions

Bug #102188

closed

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

Added by Oliver Pfaff about 1 year ago. Updated 5 months ago.

Status:
Closed
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 about 1 year 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 #2

Updated by Garvin Hicking 5 months ago

  • Status changed from New to Closed

The docs were updated with https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-Typoscript/pull/1114 to mention that this setting should no longer be used.

Thus I am closing the issue here. If you find other places in the docs were it would need adoption, please let me know or create a follow-up issue. I hope this is ok!

Actions

Also available in: Atom PDF