Bug #91218

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

Added by Josef Glatz over 1 year ago. Updated 12 months ago.

Status:
Rejected
Priority:
Should have
Assignee:
Category:
Localization
Target version:
-
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?
#1

Updated by Georg Ringer over 1 year ago

  • Status changed from New to Needs Feedback
#2

Updated by Josef Glatz over 1 year ago

  • Assignee set to Josef Glatz

I have to answer some questions myself. Please ignore this issue until then^^

#3

Updated by Georg Ringer 12 months ago

  • Status changed from Needs Feedback to Rejected

I am closing this issue because there is no way during rendering to know if an empty string from translation is valid or not. if this is important to an integrator/dev, the default argument needs to be used.

feel free to discuss on slack if still relevant to you

#4

Updated by Josef Glatz 12 months ago

For reference: it's ok to reject, since only XLF is supported with TYPO3 11

Also available in: Atom PDF