Problem/Motivation
Config form shows the following error
The website encountered an unexpected error. Try again later.
TypeError: Drupal\Core\Form\ConfigFormBase::__construct(): Argument #1 ($config_factory) must be of type Drupal\Core\Config\ConfigFactoryInterface, null given, called in /var/www/html/web/modules/contrib/govuk_notify/src/Form/GovUKNotifyAdminForm.php on line 26 in Drupal\Core\Form\ConfigFormBase->__construct() (line 41 of core/lib/Drupal/Core/Form/ConfigFormBase.php).
Drupal\govuk_notify\Form\GovUKNotifyAdminForm->__construct() (Line: 33)
Drupal\govuk_notify\Form\GovUKNotifyAdminForm::create() (Line: 41)
Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() (Line: 48)
Drupal\Core\Controller\HtmlFormController->getFormObject() (Line: 58)Steps to reproduce
Log in and visit /admin/config/system/govuk_notify as an administrator.
Proposed resolution
Use the passed value to the constructor for the config factory rather than $this. Promoted properties aren't usable in the constructor (TIL!).
Remaining tasks
All the things.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork govuk_notify-3458012
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
eli-tComment #5
eli-t