Applied to 3.0.x-dev release

Created on 26 April 2024, 2 months ago
Updated 14 May 2024, about 2 months ago

Problem/Motivation

After upgrading from 2.0 to 3.0 and if you do not have any excluded icons in your settings (/admin/config/ckmoon/settings), you will get the following error:

The website encountered an unexpected error. Please try again later.
TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in array_filter() (line 165 of modules/contrib/ckmoon/src/CkmoonManager.php).
Drupal\ckmoon\CkmoonManager->getIconList() (Line: 57)
Drupal\ckmoon\Plugin\CKEditor5Plugin\CkmoonPlugin->getDynamicPluginConfig() (Line: 316)
Drupal\ckeditor5\Plugin\CKEditor5PluginManager->getCKEditor5PluginConfig() (Line: 947)
Drupal\ckeditor5\Plugin\Editor\CKEditor5->getJSSettings() (Line: 81)
Drupal\editor\Plugin\EditorManager->getAttachments() (Line: 100)
Drupal\editor\Element->preRenderTextFormat()
call_user_func_array() (Line: 111)
...

Steps to reproduce

  1. Upgrade CK Moon from older version to 3.0
  2. Check ckmoon.config.xml and ensure there is no "icon_exclusion" settings
  3. Log in to your site as an administrator and you will see the error

Proposed resolution

Check for NULL before passing the array to array_filter()

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

๐Ÿ‡ฆ๐Ÿ‡บAustralia avitus80

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024