Features Manager crash due to type array

Created on 16 June 2023, over 1 year ago

After enabling features, I get the following error when trying to visit the Features Manager page.

TypeError: Drupal\features\ConfigurationItem::__construct(): Argument #2 ($data) must be of type array, bool given, called in /var/www/html/web/modules/contrib/features/src/FeaturesManager.php on line 1234 in Drupal\features\ConfigurationItem->__construct() (line 107 of /var/www/html/web/modules/contrib/features/src/ConfigurationItem.php).

Steps to reproduce:

  1. Install Drupal
  2. Install Features module
  3. Navigate to Configuration ยป Development ยป Features
  4. Page will be white screened and can check logs for more information
๐Ÿ› Bug report
Status

Closed: cannot reproduce

Version

3.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @catapipper
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    67 pass, 1 fail
  • @catapipper opened merge request.
  • Ignore this. It turned out to be related to a missing configuration in CAPTCHA 2.0 which we were updating manually, which got caught in the Features page due to it searching for that particular configuration which was missing.

  • Status changed to Closed: cannot reproduce over 1 year ago
  • ๐Ÿ‡จ๐Ÿ‡ดColombia oneliner

    Found this error, while the ticket is closed because OP took the Blame, this event and error happened to me.

    I fixed it by adding an check in the Loop of contributed feature manager class method initConfigCollection

    line 2040

    if(!$data){
                \Drupal::messenger()->addError($this->t('Configuration item @name could not be read from storage.', ['@name' => $name]));
                continue;
              }

    This will let the features page load and point you to the corrupted configuration.

Production build 0.71.5 2024