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 10 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 5 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 5 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 5 months ago
- Status changed from New to Resolved
Thanks!
I'll close here then.
Updated by Sybille Peters about 1 month ago
Jonas, is this fully resolved?
- There is no breaking / deprecation changelog AFAIK, you can
grep -r controllerExtensionName typo3/sysext/core/Documentation/Changelog
in v13, and find only an older Feature for 8.5.
- extbase.controllerExtensionName is still used in EXT:form in documentation and Tests in v13
Anyway, f:translate seems to still be working in v12 without the full LLL-path or extensionName attribute, see for example EXT:news. So, I am a bit confused. Was something changed? Can we add a changelog and properly deprecate this?
Documentation says controllerExtensionName is no longer supported in v12:
Updated by Eric Harrer about 1 month ago
Anyway, f:translate seems to still be working in v12 without the full LLL-path or extensionName attribute, see for example EXT:news.
EXT:news
operates in the Extbase context. The correct controller extension name is already set out-of-the-box there. Accordingly, THERE f:translate
works as usual. However, this issue is about the TypoScript FLUIDTEMPLATE
object, which could previously be "enriched" with information about the Extbase context using extbase.controllerExtensionName
. This is now no longer possible.
Updated by Jonas Eberle about 1 month ago
As Eric pointed out, it is still working in Extbase context but the functionality for plain FLUIDTEMPLATE broke. Since I think the functionality was not really advertised before (and the name extbase.controllerExtensionName hinted that it was not intended to use without Extbase) it is now just better documented. Actually that setting does not have any importance for integrators now any more. It could thus also be @internal and removed from the docs IMHO.