Undefined array key "url" in Drupal\Core\Asset\JsCollectionOptimizerLazy->optimizeGroup()

Created on 24 November 2023, 12 months ago
Updated 25 November 2023, 12 months ago

Problem/Motivation

Getting Warning: Undefined array key "url" in Drupal\Core\Asset\JsCollectionOptimizerLazy->optimizeGroup() after installing the Highlight -dev version in Drupal 10 site.

Steps to reproduce

Installed the latest dev version of highlight in my 10.1.5 site.

https://www.drupal.org/project/highlight/releases/8.x-1.x-dev β†’

as per: https://www.drupal.org/project/highlight/issues/3287892#comment-15312879 πŸ“Œ Automated Drupal 10 compatibility fixes Fixed

It works. But I get this error every time I go into "Structure" or "Enable"

Warning: Undefined array key "url" in Drupal\Core\Asset\JsCollectionOptimizerLazy->optimizeGroup() (line 174 of core/lib/Drupal/Core/Asset/JsCollectionOptimizerLazy.php).
Drupal\Core\Asset\JsCollectionOptimizerLazy->optimizeGroup(Array) (Line: 183)
Drupal\system\Controller\AssetControllerBase->deliver(Object, 'js_q-CstTboDpeq_U8vRaN4F4gs80cO_uVUdnLZXGfqSVA.js')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 592)
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: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 19)
Drupal\sbn\Middleware\Redirect->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
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: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 42)
Drupal\tracer\StackMiddleware\TracesMiddleware->handle(Object, 1, 1) (Line: 34)
Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Warning goes away when I uninstall Highlight.

Proposed resolution

Just need to know how to fix to eliminate these warnings.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States somebodysysop

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

Comments & Activities

Production build 0.71.5 2024