Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
#15 | minimal-without-version.png | 23.62 KB | murilohp |
#7 | install_profile_info.patch | 635 bytes | RaisinBranCrunch |
Comments
Comment #1
dawehnerThat 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.
Comment #2
dawehnerThat 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.
Comment #3
DamienMcKennaSo there should be something like this in the settings.php file, right?
Comment #4
dawehnerYeah ...
Comment #5
dawehnerYeah ...
Comment #6
hkirsman CreditAttribution: hkirsman commentedComment #7
RaisinBranCrunch CreditAttribution: RaisinBranCrunch commentedI 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:
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?
Comment #15
murilohp CreditAttribution: murilohp at CI&T commentedI 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: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.Comment #16
murilohp CreditAttribution: murilohp at CI&T commentedPer #15, I'm moving this to "Closed (cannot reproduce)". Thanks!
Comment #17
DamienMcKennaI think "outdated" is a better status, because it was happening at one point but the errors are now gone.