- Issue created by @andres.torres
- 🇪🇨Ecuador andres.torres
Quick update, i just enabled a new server without Varnish installed, just Apache (2.4.5) and PHP (8.2) and the Javascript issue is present with Geolocation 8.x.3.14 and 8.x.3-dev. so this has nothing to do with Varnish for anonymous users.
- 🇪🇨Ecuador andres.torres
I just installed a brand new Drupal 10.4 today as is was released and double tested Geolocation 8.x.3.4 on a standard LAMP installation (No Varnish) and using Olivero as default theme, the issue still persists with Leaflet for Anonymous users. Guess we might need to set the issue as critical since Leaflet is the only opensource solution for maps in Drupal through the Geolocation module.
- 🇪🇨Ecuador andres.torres
After doing a little research and testing it seems that this issue is related to the following:
https://www.drupal.org/node/3473558 → Asset ordering is now more strictly determined by library dependencies.
on Drupal 10.3.10, Drupal 10.4 releasesSee also https://www.drupal.org/project/entity_browser/issues/3485010 ✨ Update CI configuration Active Update CI configuration and fix JS dependencies.
I'm attaching these since Leaflet Maps were working on prior versions of Geolocation Field 8.x.3.x with Drupal 10.3.1 for example. So my guess is that the new JS libraries handler introduced in Drupal 10.4 is affecting how Geolocation Field is loading them.
- 🇩🇪Germany jan kellermann
Could not reproduce.
- I installed a new D10.4 and required
drupal/geolocation:^3.14
. - I enabled
geolocation_leaflet
(drush automatically installed all further modules.) - I added a new geo field to content type basic page with display
Geolocation Formatter - Map
without any further options. - I created a new node with a geolocation.
- I viewed this node as anonymous user with and without JS aggregation and also with multiple
drush cr
.
Can you provide more information? Maybe a screenshot of network tab in your browsers DevTools?
- I installed a new D10.4 and required
- 🇪🇨Ecuador andres.torres
Hi Jan, thanks for your reply. I think we can disregard the issue for now, after running more tests, i was able to get the map working again on the site im working on by uninstalling 8.3.4 and upgrading to the 4.x branch my guess its that the mysql database got corrupted during core and modules upgrades from 10.3.1 to 10.3.10 and 10.4.
- 🇫🇮Finland oakulm
I'm also experiencing this issue. The solution is not good if the way is to move from 3.x to 4.x. I will try to see what's the problem
- 🇺🇦Ukraine seonic
Confirmed, the same issue. In my case this is a problem with a tour module.
Minified js of the tour module defines the L function:function L(e) { e.parentNode && e.parentNode.removeChild(e) }
Geolocation's leafletPromise resolves it as real leaflet map and processes it which cause the error.
You can check which script overrides L function just console.log the L variable in the leafletPromise.
Steps to reproduce:
1. Install D10.4.1
2. Install Tour module
3. Login as user with 'access tour' permission and check map in admin interface or elsewhere.Is this a problem of the geolocation module when some js files may override global L variable?