Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default RTE Preset "Minimal" Triggers Exception #36

Open
Scopestyle opened this issue Dec 11, 2023 · 1 comment
Open

Default RTE Preset "Minimal" Triggers Exception #36

Scopestyle opened this issue Dec 11, 2023 · 1 comment

Comments

@Scopestyle
Copy link

l10nmgr Version: 11.2.0
TYPO3: 11.5.33
PHP Version: 8.0

Error:
The default RTE Preset Minimal does not contain a part extraPlugins, the l10n code requires this in l10nmgr/Classes/View/L10nHtmlListView.php. Because the part is missing in the default config in typo3/sysext/rte_ckeditor/Configuration/RTE/Minimal.yaml l10nmgr is throwing an error, this needs to be adressed.

Log Error:

Mon, 11 Dec 2023 09:07:35 +0100 [CRITICAL] request="fe10c98d0154f" component="TYPO3.CMS.Core.Error.ProductionExceptionHandler": Core: Exception handler (WEB: BE): TypeError, code #0, file /html/typo3-dev/typo3conf/ext/l10nmgr/Classes/View/L10nHtmlListView.php, line 219: array_flip(): Argument #1 ($array) must be of type array, null given - {"mode":"WEB","application_mode":"BE","exception_class":"TypeError","exception_code":0,"file":"/html/typo3-dev/typo3conf/ext/l10nmgr/Classes/View/L10nHtmlListView.php","line":219,"message":"array_flip(): Argument #1 ($array) must be of type array, null given","request_url":"https://{redacted}/typo3/module/LocalizationManager?token=--AnonymizedToken--&id=1&srcPID=1&exportUID=2","exception":null}

Code in L10nHtmlListView.php:

$configuration['extraPlugins'] = implode(',', array_flip(array_flip($configuration['extraPlugins'])));
@Konafets
Copy link
Collaborator

Konafets commented Dec 11, 2023

As this key is only accessed if the configuration has the editor.externalPlugins key:

if (isset($richtextConfiguration['editor']['externalPlugins'])) {
$configuration['extraPlugins'] = GeneralUtility::trimExplode(',', $configuration['extraPlugins'] ?? '');

However, I think the code should also check if there is a the key extraPlugins present in the configuration array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants