Error trying to configure Search404 in Drupal 11.0.5

Created on 24 October 2024, 28 days ago

Problem/Motivation

When enabling the module in Drupal 11.0.5, I am getting this error when trying to configure it:

[24-Oct-2024 09:27:03 America/Chicago] Uncaught PHP Exception ArgumentCountError: "Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /modules/contrib/search404/src/Form/Search404Settings.php on line 47 and exactly 2 expected" at /core/lib/Drupal/Core/Form/ConfigFormBase.php line 43

The code in the module looks like this:

  public function __construct(ConfigFactoryInterface $configFactory, ModuleHandlerInterface $module_handler) {
    parent::__construct($configFactory);
    $this->moduleHandler = $module_handler;
  }


The parent construct looks like this:

  public function __construct(
    ConfigFactoryInterface $config_factory,
    protected TypedConfigManagerInterface $typedConfigManager,

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States camoa

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

Comments & Activities

Production build 0.71.5 2024