Warning: Undefined array key "name" in DrupalDotOrgJsonApi->getProjects()

Created on 6 December 2024, 3 months ago

Problem/Motivation

When browsing all projects in project browser (/admin/modules/browse), sometimes a warning displays:

Warning: Undefined array key "name" in Drupal\project_browser\Plugin\ProjectBrowserSource\DrupalDotOrgJsonApi->getProjects() (line 382 of modules/contrib/project_browser/src/Plugin/ProjectBrowserSource/DrupalDotOrgJsonApi.php).

Drupal\project_browser\Plugin\ProjectBrowserSource\DrupalDotOrgJsonApi->getProjects() (Line: 171)
Drupal\project_browser\EnabledSourceHandler->doQuery() (Line: 113)
Drupal\project_browser\EnabledSourceHandler->getProjects() (Line: 59)
Drupal\project_browser\Controller\ProjectBrowserEndpointController->getAllProjects()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

Visit project browser (/admin/modules/browse)
Click "Clear filters"
Go to the last page using the pager
Refresh the page
The warning will be displayed (if using DDEV with errors display turned on)

Proposed resolution

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇸🇰Slovakia poker10

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

Comments & Activities

Production build 0.71.5 2024