Logging this here while I debug the problem as it might help others.

Loading admin/reports/system on this beta9 site results in the following errors:

  • Notice: Undefined index: name in system_requirements() (line 41 of core/modules/system/system.install).
  • Notice: Undefined index: version in system_requirements() (line 43 of core/modules/system/system.install).
  • Exception: The configuration directory type active does not exist. in config_get_config_directory() (line 176 of core/includes/bootstrap.inc).
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

That error happens if you have missed to define which installation profile you have as part of your settings.php ...

I think though we better build some protection against that as part of the issue.

dawehner’s picture

That error happens if you have missed to define which installation profile you have as part of your settings.php ...

I think though we better build some protection against that as part of the issue.

DamienMcKenna’s picture

So there should be something like this in the settings.php file, right?

$settings['install_profile'] = 'minimal';
dawehner’s picture

Yeah ...

dawehner’s picture

Yeah ...

hkirsman’s picture

Version: 8.0.0-beta9 » 8.0.6
RaisinBranCrunch’s picture

Version: 8.0.6 » 8.3.x-dev
Status: Active » Needs review
FileSize
635 bytes

I don't see how this issue could not happen if you're using an installation profile other than standard. If you look at the code, we're pretending that installation profiles are modules, and I don't understand why:

$profile = drupal_get_profile();
    if ($profile != 'standard') {
      $info = system_get_info('module', $profile);
      $requirements['install_profile'] = [
        'title' => t('Installation profile'),
        'value' => t('%profile_name (%profile-%version)', [
          '%profile_name' => $info['name'],
          '%profile' => $profile,
          '%version' => $info['version']
        ]),
        'severity' => REQUIREMENT_INFO,
        'weight' => -9
      ];
    }

Try the above code in a drush script.

If we just use installation_profile_info($profile) instead of system_get_info, this won't happen. Is there any reason not to change this?

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
murilohp’s picture

FileSize
23.62 KB

I was testing this issue locally using drupal 9.3, and it's not happening anymore, the code is now using:

$info = \Drupal::service('extension.list.module')->getExtensionInfo($profile);

The "getExtensionInfo" will properly return an array with the information. And the undefined index error will not happen.

But, I think we still have something to address here, the code uses both "name" and "version" from the profile, which means, it's expected that the "profile.info.yml" file has those keys, fortunately the "name" key is now required(maybe on D8 it wasn't), so in order to have a profile you must define a name for it. But that's not the case for the "version" key, you can have a profile without "version".

So if you install a profile without the version key, the $info = \Drupal::service('extension.list.module')->getExtensionInfo($profile); will handle this and set the $info['version'] to NULL(which avoid the error of this issue), but on the screen the user will see something like:
minimal profile without version

Do you think we need to handle the cases where the "version" key is empty?

FYI: If you wanna test this issue you can install a new drupal 9.3 instance with the "minimal" profile instead of the standard. Then open core/profiles/minimal/minimal.info.yml file and remove the "version" key.

murilohp’s picture

Status: Needs review » Closed (cannot reproduce)
Issue tags: +Bug Smash Initiative

Per #15, I'm moving this to "Closed (cannot reproduce)". Thanks!

DamienMcKenna’s picture

Status: Closed (cannot reproduce) » Closed (outdated)

I think "outdated" is a better status, because it was happening at one point but the errors are now gone.