License URLs missing in geolocation_leaflet.libraries.yml

Created on 24 April 2024, 7 months ago
Updated 27 April 2024, 7 months ago

Problem/Motivation

Error Undefined array key "url" in Drupal\Core\Asset\JsCollectionOptimizerLazy->optimizeGroup() after clearing cache.

Steps to reproduce

    Install 8.x-3.12 of this module.
  1. Enable JS aggregation in /admin/config/development/performance
  2. Flush cache.
  3. Check the /admin/reports/dblog

I used this shell script to find problematic files:

for dir in $(find .); do
  [[ ! -d $dir ]] && continue                                          
  export file=$dir/$(basename $dir).libraries.yml;
  [[ ! -f $file ]] && continue                                          
  for key in $(cat $file | yq '. | keys'); do
    if [[ $key == "-" ]]; then continue; fi;
    if [[ $(cat $file | yq .'"'$key'".license') == "null" ]]; then continue; fi;
    if [[ $(cat $file | yq .'"'$key'".license.url') != "null" ]]; then continue; fi;
    echo ---------$file-----------;
    echo --key: $key;
  done;
done

Proposed resolution

Add the 'url' key to all .libraries.yml files - see attached patch.

See also issue #3403933 🐛 Undefined array key "url" in Drupal\Core\Asset\JsCollectionOptimizerLazy->optimizeGroup() Fixed .

Remaining tasks

Review and apply the patch.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Closed: duplicate

Version

3.12

Component

Leaflet API

Created by

🇩🇪Germany gogowitsch

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

Comments & Activities

Production build 0.71.5 2024