Closed (fixed)
Project:
Leaflet
Version:
10.3.0
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jun 2025 at 22:12 UTC
Updated:
2 Jul 2025 at 09:49 UTC
Jump to comment: Most recent
When the Reset Map View Control is enabled on a map, the map does not load for authenticated users, with downstream libraries reporting errors such as:
Uncaught TypeError: L.FeatureGroup is undefined
<anonymous> MarkerClusterGroup.js:5
<anonymous> leaflet.markercluster.js:1
<anonymous> leaflet.markercluster.js:1
leaflet.markercluster.js:1:243
Uncaught TypeError: L.Polyline is undefined
<anonymous> https://[removed].ddev.site/modules/contrib/leaflet/js/leaflet.drupal.js?sy0tj0:1087
<anonymous> https://[removed].ddev.site/modules/contrib/leaflet/js/leaflet.drupal.js?sy0tj0:1119
leaflet.drupal.js:1087:3
Uncaught TypeError: L.TileLayer is undefined
<anonymous> https://[removed].ddev.site/modules/contrib/leaflet_more_maps/leaflet_more_maps.js?sy0tj0:25
leaflet_more_maps.js:25:1
Uncaught TypeError: L.DomUtil is undefined
loadMap https://[removed].ddev.site/modules/contrib/leaflet/js/leaflet.drupal.js?sy0tj0:24
mapObserver https://[removed].ddev.site/modules/contrib/leaflet/js/leaflet.drupal.js?sy0tj0:184
attach https://[removed].ddev.site/modules/contrib/leaflet/js/leaflet.drupal.js?sy0tj0:180
jQuery 2
attach https://[removed].ddev.site/modules/contrib/leaflet/js/leaflet.drupal.js?sy0tj0:16
each jQuery
attach https://[removed].ddev.site/modules/contrib/leaflet/js/leaflet.drupal.js?sy0tj0:10
attachBehaviors https://[removed].ddev.site/core/misc/drupal.js?v=10.4.7:166
attachBehaviors https://[removed].ddev.site/core/misc/drupal.js?v=10.4.7:162
insert https://[removed].ddev.site/core/misc/ajax.js?v=10.4.7:1402
jQuery 2
insert https://[removed].ddev.site/core/misc/ajax.js?v=10.4.7:1394
commandExecutionQueue https://[removed].ddev.site/core/misc/ajax.js?v=10.4.7:1046
promise callback*Drupal.Ajax.prototype.commandExecutionQueue/< https://[removed].ddev.site/core/misc/ajax.js?v=10.4.7:1039
commandExecutionQueue https://[removed].ddev.site/core/misc/ajax.js?v=10.4.7:1036
success https://[removed].ddev.site/core/misc/ajax.js?v=10.4.7:1095
success https://[removed].ddev.site/modules/contrib/blazy/js/base/io/bio.ajax.min.js?sy0tj0:1
processReplacement https://[removed].ddev.site/core/modules/big_pipe/js/big_pipe.js?v=10.4.7:84
checkMutationAndProcess https://[removed].ddev.site/core/modules/big_pipe/js/big_pipe.js?v=10.4.7:110
processMutations https://[removed].ddev.site/core/modules/big_pipe/js/big_pipe.js?v=10.4.7:134
processMutations https://[removed].ddev.site/core/modules/big_pipe/js/big_pipe.js?v=10.4.7:133
MutationCallback* https://[removed].ddev.site/core/modules/big_pipe/js/big_pipe.js?v=10.4.7:150
<anonymous> https://[removed].ddev.site/core/modules/big_pipe/js/big_pipe.js?v=10.4.7:184
leaflet.drupal.js:24:64
Removing the library leaflet/leaflet.reset_map_view from rendering in the HEAD, and allowing to render when needed.
None.
None.
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 #3
jaypanComment #5
itamair commentedOk ... I extended the leaflet.reset_map_view fix (removal it explicit load from the header) to all the other leaflet modules libraries requested in the same way, and I couldn't find any regressions, in the drupal instances and use cases that I tested,
and even some performance improvements.
This commit https://git.drupalcode.org/project/leaflet/-/commit/c6f962793fd7f6c1fcd3... includes this MR!58 fix.
Closing the MR!58 and going to deploy new releases for both the 10.3.x and 10.2.x brach with all this.
Comment #7
itamair commentedleaflet 10.3.1 release should have fixed this.