Fix Type Error for the constructor for ConfigIgnoreConfig with Argument #1 ($mode) must be of type string, null given

Created on 6 November 2023, about 1 year ago
Updated 13 January 2024, 11 months ago

Problem/Motivation

Hitting the following error after upgrading from ~2.0 to ~3.0
TypeError: Drupal\config_ignore\ConfigIgnoreConfig::__construct(): Argument #1 ($mode) must be of type string, null given

Steps to reproduce

When I go to "/admin/config/development/configuration" after a fresh install
Then I hit the following fatal error

The website encountered an unexpected error. Please try again later.

TypeError: Drupal\config_ignore\ConfigIgnoreConfig::__construct(): Argument #1 ($mode) must be of type string, null given, called in ~~~~~~~~/modules/contrib/config_ignore/src/ConfigIgnoreConfig.php on line 73 in Drupal\config_ignore\ConfigIgnoreConfig->__construct() (line 29 of modules/contrib/config_ignore/src/ConfigIgnoreConfig.php).

Proposed resolution

  • Pass the "simple" string to the mode when no config in config/sync and active config
  • Pass [] array to the data

Remaining tasks

  • File an issue
  • MR/Patch
  • Test
  • Review

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A
🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇯🇴Jordan Rajab Natshah Jordan

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024