Hello!

I have been experiencing this issue with 2 sites now and could not find a way to fix it. It's a minor annoyance but with a "generous" error reporting it will be quite evident for end users.

This is the error that I get, when going to administrative pages:

Notice: Undefined index: name in system_requirements() (line 43 of core/modules/system/system.install).
system_requirements('runtime')
call_user_func_array('system_requirements', Array)
Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array)
Drupal\system\SystemManager->listRequirements()
Drupal\system\SystemManager->checkRequirements()
Drupal\system\Controller\SystemController->overview('system.admin_config')
call_user_func_array(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)
Notice: Undefined index: version in system_requirements() (line 45 of core/modules/system/system.install).
system_requirements('runtime')
call_user_func_array('system_requirements', Array)
Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array)
Drupal\system\SystemManager->listRequirements()
Drupal\system\SystemManager->checkRequirements()
Drupal\system\Controller\SystemController->overview('system.admin_config')
call_user_func_array(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)

The issue seems that the call to system_get_info in system.install:

$info = system_get_info('module', $profile);

returns an empty array instead of the version and name information, resulting then in the notice.

I could not find a way to fix this. Any ideas?

Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vermario created an issue. See original summary.

vermario’s picture

Title: Notice on admin/config pages about missing version and name in hook_requirements » Notice on admin/config pages about missing version and name in system_requirements
alexpott’s picture

@vermario this is weird because the config_installer is not suppose to every actually be installed. Can you paste the output of your core.extension configuration.

alexpott’s picture

Issue summary: View changes
vermario’s picture

Hello!

here it is:

module:
  automated_cron: 0
  block: 0
  block_content: 0
  breakpoint: 0
  ckeditor: 0
  color: 0
  comment: 0
  config: 0
  contact: 0
  contextual: 0
  ctools: 0
  datetime: 0
  dblog: 0
  dynamic_page_cache: 0
  editor: 0
  field: 0
  field_group: 0
  field_group_migrate: 0
  field_ui: 0
  file: 0
  filter: 0
  help: 0
  history: 0
  image: 0
  language: 0
  link: 0
  locale: 0
  menu_ui: 0
  migrate: 0
  migrate_drupal: 0
  migrate_upgrade: 0
  node: 0
  options: 0
  page_cache: 0
  path: 0
  pathologic: 0
  quickedit: 0
  rdf: 0
  redis: 0
  shortcut: 0
  system: 0
  taxonomy: 0
  text: 0
  tmgmt: 0
  tmgmt_file: 0
  tmgmt_language_combination: 0
  tmgmt_local: 0
  tmgmt_locale: 0
  token: 0
  toolbar: 0
  tour: 0
  user: 0
  views_ui: 0
  menu_link_content: 1
  pathauto: 1
  views: 10
theme:
  stable: 0
  classy: 0
  bartik: 0
  seven: 0
_core:
  default_config_hash: m2GVq11UAOVuNgj8x0t5fMOPujpvQQ_zxLoaly1BMEU

In the status page, the installation profile is reported like this:

Thanks for the help!

Mario.

alexpott’s picture

I see so I guess that it is set in the settings.php

vermario’s picture

Hello!

It is indeed set in settings.php. When we do the installation, we do it with drush si, setting the installation profile that way. Is that not how it's supposed to be used?

So, shall I set that to the "standard" installation profile now? It does get rid of the annoying notice if I do so.

Sorry for bothering you, somehow the way that this profile works is a bit mysterious :)

alexpott’s picture

@vermario so the config_installer is supposed to detect the installation profile from the incoming settings. So it should never end up the chosen installation profile. So I guess I need to harden the code here to ensure that the profile is not set to config_installer. And yes changing it or removing it is fine. I don't think an installation profile should be mandatory. That said who knows what contrib relies on.

alexpott’s picture

What is interesting about your core.extension file is that there is no initially installed configuration profile which makes me ponder how did you create that?

gbirch’s picture

I am having the same issue with a new sandbox site created and installed on Acquia, then downloaded to my Linux box. Drupal 8.1.7, installation profile is reported as (-) on the status report.
Resolved by putting $settings['install_profile'] = 'standard'; into my settings.local.php.

So, an Acquia spin-up problem? I should note that if so, it is one of many.

ashleywilson’s picture

I get a similar error when trying to enable verbose logging in sites/default/settings.local.php. I have also downloaded my codebase from an Acquia sandbox through Acquia Dev Desktop 2.

The error is removed if I comment-out the line which enables verbose logging.

This is the full error message:

Notice: Undefined index: name in system_requirements() (line 46 of core\modules\system\system.install).
system_requirements('runtime')
call_user_func_array('system_requirements', Array) (Line: 402)
Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array) (Line: 112)
Drupal\system\SystemManager->listRequirements() (Line: 49)
Drupal\system\Controller\SystemInfoController->status()
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 139)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 652)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Notice: Undefined index: version in system_requirements() (line 48 of core\modules\system\system.install).
system_requirements('runtime')
call_user_func_array('system_requirements', Array) (Line: 402)
Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array) (Line: 112)
Drupal\system\SystemManager->listRequirements() (Line: 49)
Drupal\system\Controller\SystemInfoController->status()
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 139)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 652)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Notice: Undefined index: package in system_requirements() (line 60 of core\modules\system\system.install).
system_requirements('runtime')
call_user_func_array('system_requirements', Array) (Line: 402)
Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array) (Line: 112)
Drupal\system\SystemManager->listRequirements() (Line: 49)
Drupal\system\Controller\SystemInfoController->status()
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 139)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 652)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
heddn’s picture

dobrzyns’s picture

This is actually a core issue. If the install profile is set to minimal in settings.php, I get the same error. Setting the install profile to standard resolves the issue.

I was able to resolve this with this patch: https://www.drupal.org/node/1170362#comment-10429587

alexpott’s picture

alexpott’s picture

Status: Needs review » Closed (duplicate)

I think #2156401: Write install_profile value to configuration and only to settings.php if it is writeable is going make this a lot harder to occur. Tentatively marking as closed duplicate. Can't really resolve this in config_installer. Using this should never result in a missing profile if it does then we'll re-open and work out why.

mchelen’s picture

I still have the same issue on Drupal 8.3.7 and config_installer 1.4.0

My codebase gets deployed to the server including a settings.php that contains $settings['install_profile'] = 'standard';

Then I run drush si config_installer and when it completes it has modified settings.php to be $settings['install_profile'] = 'config_installer';

Then I have to manually set the file writable and modify this line.

Is there something I should be doing differently to avoid causing this problem?

garek007’s picture

I am having this issue after upgrading to 8.5.1