Actions
Bug #91218
closedSame name of a xlf/xml file can break the frontend
Start date:
2020-04-27
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
xlf,fliff,xml,locallang
Complexity:
Is Regression:
Sprint Focus:
Description
Problem/Description¶
Real world scenario¶
- TYPO3 instance which was updated from 6.2 to 8.7 and so on..
- ext:news (can be any extension) where I use in fluid
<f:translate key="LLL:typo3conf/ext/mysitepackage/Resources/Private/Language/locallang.xml:news_list_more"></f:translate>
Now somebody™ overlook the present EXT:mysitepackage/Resources/Private/Language/locallang.xml and create a new xlf file beside the existing with the same name locallang
where I don't put the existing id's from xml.
Result¶
a fluid construct like
<f:link.page pageUid="{settings.listPid}"><f:translate key="LLL:typo3conf/ext/mysitepackage/Resources/Private/Language/locallang.xml:news_list_more"></f:translate></f:link.page>
is rendered as self-closing A-tag like
<a href="/asdfasf/" />
which breaks the DOM because the id "news_list_more
" can not be found in the xlf file. Seems like xlf has priority over xml like it is per default in \TYPO3\CMS\Core\Localization\LanguageStore::$supportedExtensions
.
ToDo(s)¶
- Throw error/exception? Or log problems?
- Prevent breaking a frontend?
Actions