Bug #101401
closedEpic #99669: CKEditor5 Collection
Undefined array key "ui" in vendor/typo3/cms-rte-ckeditor/Classes/Form/Element/RichTextElement.php
100%
Description
Revision 44d96519 added two unchecked array key access (RichTextElement.php L193 and L198)
$uiLanguage = $ckeditorConfiguration['options']['language']['ui']; if ($this->translationExists($uiLanguage)) { $resultArray['javaScriptModules'][] = JavaScriptModuleInstruction::create('@typo3/ckeditor5/translations/' . $uiLanguage . '.js'); } $contentLanguage = $ckeditorConfiguration['options']['language']['content']; if ($this->translationExists($contentLanguage)) { $resultArray['javaScriptModules'][] = JavaScriptModuleInstruction::create('@typo3/ckeditor5/translations/' . $contentLanguage . '.js'); }
$ckeditorConfiguration
is generated in RichTextElement::prepareConfigurationForEditor() and is based on the editor.config
array from the RTE yaml files.
CKeditor's text part language feature uses the config.language.textPartLanguage
configuration option. This feature is currently missing (see #101128), but if configured in RTE yaml causes prepareConfigurationForEditor() to assume the UI language of the editor if hard-coded (empty($configuration['language'])
is checked instead of empty($configuration['language']['ui'] ?? null)
).
RTE configuration causing exception¶
editor: config: language: textPartLanguage: - { title: 'English', languageCode: 'en' } - { title: 'French', languageCode: 'fr' } - { title: 'German', languageCode: 'de' }
Workaround¶
editor: config: language: # Use hard-coded UI language ui: en textPartLanguage: - { title: 'English', languageCode: 'en' } - { title: 'French', languageCode: 'fr' } - { title: 'German', languageCode: 'de' }
Updated by Georg Tiefenbrunn over 1 year ago
- Related to Feature #101128: CKeditor implement bidi and language Plugin again added
Updated by Georg Tiefenbrunn over 1 year ago
- Related to Epic #99669: CKEditor5 Collection added
Updated by Georg Tiefenbrunn over 1 year ago
- Related to Bug #100873: CKEditor language files missing added
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80112
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80113
Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80112
Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80112
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 12.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/+/80575
Updated by Torben Hansen over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 22dbe1dad99286b66e7926c41babfae3332485e6.