Problem/Motivation

Error occurs when visiting the module settings page (admin/config/content/insert).

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

The error occurs due to the TypedConfigManagerInterface was optional in Drupal 10 but required in Drupal 11 as mentioned in https://www.drupal.org/node/3404140

Steps to reproduce

Fresh install of Drupal 11
Install insert module via composer
Enable module
Go to module settings page (admin/config/content/insert)

Proposed resolution

Add TypedConfigManagerInterface to src/Form/ConfigForm.php

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 insert-too-few-argument-3499306-1.patch797 bytesstevechai

Comments

stevechai created an issue. See original summary.

stevechai’s picture

StatusFileSize
new797 bytes

This patch fix the issue on Drupal 11

  • snater committed 56541456 on 3.x
    Issue #3499306 by stevechai: TypedConfigManagerInterface required for...
snater’s picture

Status: Active » Fixed

Thanks for the patch!

superfedya’s picture

This patch works fine. Thanks

Status: Fixed » Closed (fixed)

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