Bug #102315
closed
FLUIDTEMPLATE: extbase.controllerExtensionName does not allow to skip f:translate|extensionName any more
Added by Jonas Eberle 9 months ago.
Updated 6 days ago.
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
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.
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?
- Status changed from New to Resolved
Thanks!
I'll close here then.
- Status changed from Resolved to Closed
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:
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.
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.
Also available in: Atom
PDF