Issue Bug Rejected

#91218Same name of a xlf/xml file can break the frontend

Josef Glatz 04/28/20, 11:25 updated 10/21/20, 08:34

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?

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.