3 warning at the text format edit page before configuration

Created on 5 November 2024, 5 months ago

Problem/Motivation

Install v3.0.1 of this module on a fresh Drupal 10.3.6 site with composer and enable it. Follow the provided help:

Enable the text format filter Display responsive images or Display image styles and select the images styles/responsive styles that you want to be available to the user.
Create new content. In the editor, click on the image icon in the toolbar. A popup will open where the user can upload an image then assign an image style or responsive style by selecting style from a dropdown menu.

On step 1, as soon as you visit any of the default text formats' edit pages, you get 3 warnings (last one is repeated twice):

  1. Warning: Undefined array key "image_styles" in Drupal\inline_responsive_images\Plugin\Filter\FilterImageStyle->settingsForm() (line 115 of modules/contrib/inline_responsive_images/src/Plugin/Filter/FilterImageStyle.php).
  2. Warning: Undefined array key "image_styles" in Drupal\inline_responsive_images\Plugin\Filter\FilterResponsiveImageStyle->settingsForm() (line 103 of modules/contrib/inline_responsive_images/src/Plugin/Filter/FilterResponsiveImageStyle.php).
  3. Warning: foreach() argument must be of type array|object, null given in Drupal\Core\Render\Element\Checkboxes::valueCallback() (line 113 of core/lib/Drupal/Core/Render/Element/Checkboxes.php).

Those go away after you actually enable the image style filter, but this represents a problem for the text filters that won't enable them (eg. Plain text), that will always display the error to the Admin / Site builder.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇮🇹Italy kopeboy Milan

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

Comments & Activities

Production build 0.71.5 2024