Warning: Undefined array key "license" in Drupal\Core\Asset\CssCollectionOptimizerLazy->optimizeGroup()

Created on 27 November 2023, 12 months ago
Updated 26 June 2024, 5 months ago

Problem/Motivation

After upgrading to Drupal 10.1 the logs are littered with these warnings:
Warning: Undefined array key "license" in Drupal\Core\Asset\CssCollectionOptimizerLazy->optimizeGroup()
Warning: Trying to access array offset on value of type null in Drupal\Core\Asset\CssCollectionOptimizerLazy->optimizeGroup()
Warning: Undefined array key "version" in Drupal\system\Controller\CssAssetController->generateHash()

Steps to reproduce

  1. Install the module and create some menu icons
  2. rebuild the cache and view any page with the menu icons
  3. check the logs

Proposed resolution

The asset optimization pipeline seems to require license and version keys in the css definition. Thus they need to be set for the css file the simple menu icons generates.

Remaining tasks

  • create patch for adding "version" and "license" keys to css definition
🐛 Bug report
Status

RTBC

Version

3.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024