Project

General

Profile

Actions

Bug #102315

closed

FLUIDTEMPLATE: extbase.controllerExtensionName does not allow to skip f:translate|extensionName any more

Added by Jonas Eberle 6 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Must have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2023-11-03
Due date:
% Done:

0%

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

Description

As mentioned in the docs, configuring extbase.controllerExtensionName should allow to skip the extensionName argument of f:translate():

page = PAGE
page.1 = FLUIDTEMPLATE
page.1 {
  extbase.controllerExtensionName = felogin
  template = TEXT
  template.value (
    <dl>
      <dt>f:translate key="username":</dt>
      <dd><f:translate key="username" /></dd>
    </dl>
  )
}

But in v12.4.8-dev, this is thrown:

#1639828178 RuntimeException

ViewHelper f:translate in non-extbase context needs attribute "extensionName" to resolve key="username" without path. Either set attribute "extensionName" together with the short key "yourKey" to result in a lookup "LLL:EXT:your_extension/Resources/Private/Language/locallang.xlf:yourKey", or (better) use a full LLL reference like key="LLL:EXT:your_extension/Resources/Private/Language/yourFile.xlf:yourKey". Alternatively, you can also define a default value.

In 11.5.33-dev this works.

Ref: FLUIDTEMPLATE docs https://docs.typo3.org/m/typo3/reference-typoscript/12.4/en-us/ContentObjects/Fluidtemplate/Index.html#extbase-controllerextensionname

Actions #1

Updated by Josef Glatz 6 months ago

I talked to lolli about this topic. This will be removed in near future (to get rid of extbase stuff. I have no more details).

It makes sense to adopt the docs to inform integrators about to not use it anymore. I also got the advise to not use it when asking some months ago in TYPO3 Slack. It's always better to use absolute key or extensionName plus key arguments in the f:translate VH.

Actions #2

Updated by Eric Harrer about 2 months ago

I can confirm the issue in v12.

@Josef Glatz @Christian Kuhn

Does "near future" refer to v12 or v13? Since in the current situation the documentation of v12 expresses that extbase.controllerExtensionName can be used as an alternative to the extensionName argument in the Translate VH, at least this addition (or even all extbase properties?) should be removed from the v12 documentation. Otherwise, this information represents an unnecessary hurdle for TYPO3 beginners. Depending on the current status, I would like to clean up the documentation accordingly. Could you provide some more concrete information on which version the plans refer to and how we could bring the documentation in line with the current state?

Actions #4

Updated by Jonas Eberle about 2 months ago

  • Status changed from New to Resolved

Thanks!

I'll close here then.

Actions

Also available in: Atom PDF