Undefined array key 'url' when optimizing CSS and JS assets in Drupal 10

Created on 13 December 2023, 7 months ago
Updated 6 April 2024, 3 months ago

Problem/Motivation

In Drupal 10, core's CSS and JS optimizers are complaining about missing license URL for the baguette.js library.

Warning: Undefined array key "url" in Drupal\Core\Asset\CssCollectionOptimizerLazy->optimizeGroup() (line 160 of /app/web/core/lib/Drupal/Core/Asset/CssCollectionOptimizerLazy.php)

Warning: Undefined array key "url" in Drupal\Core\Asset\JsCollectionOptimizerLazy->optimizeGroup() (line 174 of core/lib/Drupal/Core/Asset/JsCollectionOptimizerLazy.php)

Steps to reproduce

Clear all caches then visit the page that loads baguette.js library.

Proposed resolution

Add license URL to the library.yml

Note: This issue and its solution don't have any impact on the functionality of the module.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇷🇸Serbia vaish

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024