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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | insert-too-few-argument-3499306-1.patch | 797 bytes | stevechai |
Comments
Comment #2
stevechai commentedThis patch fix the issue on Drupal 11
Comment #4
snater commentedThanks for the patch!
Comment #5
superfedya commentedThis patch works fine. Thanks