Bug #92248
closedExtend sys_file_metadata with RTE field throws exception with language id > 0
100%
Description
I extended the sys_file_metadata table with a field which enables the RTE. When I now want to translate a metadata record in File > Filelist (language id > 0) the following exception is thrown:
Return value of TYPO3\CMS\RteCKEditor\Form\Element\RichTextElement::getLanguageIsoCodeOfContent() must be of the type string, null returned in /var/www/html/public/typo3/sysext/rte_ckeditor/Classes/Form/Element/RichTextElement.php line 196
The reason is:
In Filelist the site languages are not known, so only -1 and 0 are available ($currentLanguageUid is 1 in my case):
$contentLanguage = $this->data['systemLanguageRows'][$currentLanguageUid]['iso'];
returns null, which violates the method return type (string).
A solution can be to return "en" as language for RTE when the current language is not found.
Updated by Gerrit Code Review about 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65654
Updated by Gerrit Code Review about 4 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65654
Updated by Gerrit Code Review about 4 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65654
Updated by Gerrit Code Review about 4 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66042
Updated by Chris Müller about 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1581da0e8bb425edab31507f971ee89a73d1ecdc.