After updating from 2.2.0 to 2.3.0 I'm getting the following notice when I'm visiting /admin/config or /admin/reports/updates (latter with the update module enabled).

Notice: Undefined index: version in git_deploy_system_info_alter() (line 28 of modules/contrib/git_deploy/git_deploy.module).
git_deploy_system_info_alter(Array, Object, 'theme') (Line: 539)
Drupal\Core\Extension\ModuleHandler->alter('system_info', Array, Object, 'theme') (Line: 320)
Drupal\Core\Extension\ExtensionList->doList() (Line: 111)
Drupal\Core\Extension\ThemeExtensionList->doList() (Line: 282)
Drupal\Core\Extension\ExtensionList->getList() (Line: 108)
Drupal\Core\Extension\ThemeHandler->listInfo() (Line: 86)
system_requirements('runtime')
call_user_func_array('system_requirements', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array) (Line: 111)
Drupal\system\SystemManager->listRequirements() (Line: 95)
Drupal\system\SystemManager->checkRequirements() (Line: 102)
Drupal\system\Controller\SystemController->overview('system.admin_config')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
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}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 91)
Drupal\shield\ShieldMiddleware->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

CommentFileSizeAuthor
#2 3142991-2.patch1.06 KBkolesnikoff

Comments

leymannx created an issue. See original summary.

kolesnikoff’s picture

StatusFileSize
new1.06 KB

Patch changes the order of checks.

kolesnikoff’s picture

Status: Active » Needs review
norman.lol’s picture

Status: Needs review » Needs work

Unfortunately that doesn't fix it. There probably need to come some isset($info['version']) somewhere.

I guess that this may be related to custom modules which don't have a version key set.

james.williams’s picture

Weirdly, this notice gets thrown for me on the following two files from core:

* webroot/core/modules/block/tests/modules/block_test/themes/block_test_specialchars_theme/block_test_specialchars_theme.info.yml
* webroot/core/modules/system/tests/themes/test_theme_settings_features/test_theme_settings_features.info.yml

So I don't think it's even an issue with custom modules? I'd think that the $file->origin == 'core' check just before the code throwing the notice is actually ensuring this.

I have no idea why those particular files have no version strings, when other core files do!

  • Darren Oh committed 35b75a2 on 8.x-2.x
    Issue #3142991 by kolesnikoff, leymannx, james.williams, Darren Oh: Fix...
darren oh’s picture

Status: Needs work » Fixed

Thanks for the thorough testing and reporting. I gave everyone credit for the fix that has been committed to the dev version. Please try it out.

  • Darren Oh committed 333fb6e on 7.x-2.x
    Issue #3142991 by kolesnikoff, leymannx, james.williams, Darren Oh: Fix...

  • Darren Oh committed f28e560 on 6.x-2.x
    Issue #3142991 by kolesnikoff, leymannx, james.williams, Darren Oh: Fix...

  • Darren Oh committed fbc9f87 on 6.x-1.x
    Issue #3142991 by kolesnikoff, leymannx, james.williams, Darren Oh: Fix...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.