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.

Command icon 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

Eli-T created an issue. See original summary.

eli-t’s picture

Status: Active » Needs review

  • Eli-T committed 310ac3e1 on 3.1.x
    #3458012: 🐛  config form cannot be loaded.
    
eli-t’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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