Undefined array key "url"

Created on 14 June 2024, 6 months ago

Problem/Motivation

When using a view with an exposed filter that uses Views year filter, the error mensage

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

shows up.

This issue is similar to 🐛 Undefined array key "url" in Drupal\Core\Asset\JsCollectionOptimizerLazy->optimizeGroup() Fixed .

The libraries.yml is missing a URL key for the license.

Steps to reproduce

Set module config to use Bootstrap Datepicker in /admin/config/views-year-filter/settings. Create a views page that uses Views year filter in an exposed filter. Go to the views page as an anonimous user, select a date in Datepicker and press apply.

The error mensage

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

shows up.

Proposed resolution

Add url: https://opensource.org/license/apache-2-0 to views_year_filter.libraries.yml file.

Remaining tasks

Reviews needed (it is a pretty small fix)

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Fixed

Version

2.1

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