Notice: Undefined index: settings in /XX/gutenberg/src/Form/BlockSettingsForm.php on line 122

Created on 23 May 2022, about 2 years ago
Updated 17 November 2023, 7 months ago

Problem/Motivation

The following notice warning:
Notice: Undefined index: settings in /XX/sources/web/modules/contrib/gutenberg/src/Form/BlockSettingsForm.php on line 122

Steps to reproduce

I'm guessing it can be recreated with multiple block types but for me I had enabled the webform block type. Then in Gutenberg when I click "block settings" (cog) I get the following notice warning either written to logs or console (as an Ajax error) depending on the server error reporting settings (from what I can tell). On one environment where it triggered a console error it's more critical as it prevents the block settings modal from loading.

Here's the error:

Notice: Undefined index: settings in /XX/sources/web/modules/contrib/gutenberg/src/Form/BlockSettingsForm.php on line 122

Seems to be due to $user_input['settings'] being empty.

Proposed resolution

Check $user_input['settings'] exists before merging into $configurations. Patch to follow.

🐛 Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

🇸🇪Sweden thomjjames Sweden

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