Undefined array key "editor" in imce_editor_js_settings_alter

Created on 22 April 2024, 7 months ago
Updated 21 July 2024, 4 months ago

Problem/Motivation

Getting this warning after creating a new Text format using CKEditor 5 that is not using IMCE:

Warning: Undefined array key "editor" in imce_editor_js_settings_alter() (line 146 of modules/contrib/imce/imce.module).

Steps to reproduce

  1. Create a new Text format here: /admin/config/content/formats
  2. Select CKEditor5 as the Text editor
  3. Do NOT add the IMCE button to the active toolbar and save
  4. For my set up, I have a custom block type with a Long Text field that is set to "Required" and uses the "Allowed formats" module to ensure that only the text format you want can be used on the field. And here's where you select the Text format recently created
  5. Create a new block with this type. The warning message will be triggered.

Proposed resolution

Check that $conf['editor'] exists before checking it's value (see patch attached).

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇦🇺Australia jaydee1818 Melbourne

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024