Ck5BlockEmbedDialogForm.php throwing Argument #1 ($subform) must be of type array

Created on 30 July 2025, about 1 month ago

Problem/Motivation

The following critical error occurring:

TypeError: Drupal\Core\Form\SubformState::createForSubform(): Argument #1 ($subform) must be of type array, null given, called in /var/www/html/web/modules/contrib/ck5_block_embed/src/Form/Ck5BlockEmbedDialogForm.php on line 187 in Drupal\Core\Form\SubformState::createForSubform() (line 60 of /var/www/html/web/core/lib/Drupal/Core/Form/SubformState.php).

Steps to reproduce

Clicking on the CKEditor5 Block Embed tool, it opens the modal to select the type of block but never shows the subform to select a view block or other type of block from the selection.

Debugging the code Line 187 in Ck5BlockEmbedDialogForm, there is no $form['config']['plugin_config'] element, plugin_config is not defined in $form['config']

Proposed resolution

Attached is a patch that applied to version 1.0.2 and fixed the problem for me.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada blainelang

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

Comments & Activities

Production build 0.71.5 2024