Problem/Motivation

After updating to 1.4.2 in Drupal 11.2.8, I get the following error on the node edit form:

Warning: Undefined array key "editor" in ckeditor5_plugin_pack_layout_table_editor_js_settings_alter() (line 37 of modules/contrib/ckeditor5_plugin_pack/modules/ckeditor5_plugin_pack_layout_table/ckeditor5_plugin_pack_layout_table.module).

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mydot created an issue. See original summary.

salmonek made their first commit to this issue’s fork.

salmonek’s picture

Status: Active » Needs review

Hi mydot

I wasn't able to reproduce the issue - not sure how to configure a text format to have a js settings without an editor set. So I couldn't verify the fix.
The warning message is quite straightforward though and the published patch should fix the issue. I'd appreciate a feedback on that.

knyshuk.vova’s picture

Status: Needs review » Needs work

Hi salmonek,

I was able to reproduce the above error using both v.1.4.2 and v.1.5.0 of the module and D11.3.2, on node edit form.
In $settings["editor"]["formats"] there are filtered, wysiwyg, full_html elements, and webform_default.

"webform_default"  =>
array (
  'editorSettings' => 
  array (
    'autoGrow_minHeight' => '80',
  ),
)

Other elements (filtered, wysiwyg, full_html) have "editor" key as expected.

The above patch is not applicable to v.1.5.0.
I can confirm that the above patch (from MR) applicable to v.1.4.2 and the warning message is NOT displayed anymore.

salmonek changed the visibility of the branch 3561356-undefined-array-key-fix to active.

salmonek’s picture

Version: 1.4.2 » 1.5.1
Status: Needs work » Needs review

Pushed a 1.5.x compatible patch.
I tried to reproduce it, but somehow my webform_default had assigned ckeditor as editor.
Deliberately unsetting the array key brought the issue and the fix removed the message.

albert.garcia’s picture

Applied #7 to Drupal 11.3.6 on version 1.5.1 of the module with php 8.4 and it works.

knyshuk.vova’s picture

Assigned: mydot » Unassigned
Status: Needs review » Reviewed & tested by the community

As of #10, moved to reviewed

rokkun88 changed the visibility of the branch 3561356-undefined-array-key-fix-1.5 to hidden.

rokkun88 changed the visibility of the branch 3561356-undefined-array-key-fix-1.5 to hidden.

rokkun88 changed the visibility of the branch 3561356-undefined-array-key-fix-1.5 to active.

salmonek’s picture

Status: Reviewed & tested by the community » Fixed

Released in 1.5.3

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.