Dependency injection error in GenerateImageStyles with Drupal 11

Created on 28 March 2025, about 1 month ago

Problem/Motivation

The Drupal 11 ConfigFormBase class expects 2 arguments in constructor. The GenerateImageStyles (/admin/config/media/image-styles/generate) results in the following error:

ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /var/www/html/web/modules/contrib/easy_responsive_images/src/Form/Config/GenerateImageStyles.php on line 45 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 44 of core/lib/Drupal/Core/Form/ConfigFormBase.php).

Steps to reproduce

Install easy_responsive_image on a Drupal 11 page.

Proposed resolution

Add TypedConfigManagerInterface $typedConfigManager argument to parent constructor in GenerateImageStyles.php.

🐛 Bug report
Status

Active

Version

1.4

Component

Code

Created by

🇩🇪Germany Duwid

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024