Closed (fixed)
Project:
Leaflet
Version:
10.2.28
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Dec 2024 at 13:09 UTC
Updated:
18 Dec 2024 at 18:49 UTC
Jump to comment: Most recent
After creating a new View which renders a Leaflet map, it is not possible to edit the map settings in the view. An ajax error is thrown in the browser console.
Warning: Undefined array key \"weight\" in /var/www/html/web/modules/contrib/leaflet/src/LeafletSettingsElementsTrait.php on line 418After investigation, there is no value weight set in the getDefaultSettings() function, if the weight value is missing. Attached patch fixes this problem.
| Comment | File | Size | Author |
|---|---|---|---|
| missing_weight.patch | 493 bytes | mrcdrx |
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mrcdrx commentedComment #3
mrcdrx commentedComment #5
itamair commentedThanks @mrcdrx ... nice catch.
This last commit https://git.drupalcode.org/project/leaflet/-/commit/e4499518816dd52dc98c... implements your patch but with a better positioning of the 'weight' default value in the array.
Closing this as fixed (and crediting you).