Bug #102315
closedFLUIDTEMPLATE: extbase.controllerExtensionName does not allow to skip f:translate|extensionName any more
0%
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
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.
Updated by Eric Harrer about 2 months ago
I can confirm the issue in v12.
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?
Updated by Eric Harrer about 2 months ago ยท Edited
PR was created: https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-Typoscript/pull/1115
Instead of a "tip", a "warning" should now be issued in v12 and higher to no longer use this property.
Edit:
PR was merged in main
https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/ContentObjects/Fluidtemplate/Index.html#extbase-controllerextensionname
and v12
https://docs.typo3.org/m/typo3/reference-typoscript/12.4/en-us/ContentObjects/Fluidtemplate/Index.html#extbase-controllerextensionname
Updated by Jonas Eberle about 2 months ago
- Status changed from New to Resolved
Thanks!
I'll close here then.