Map not displaying if Varnish cache is enabled

Created on 14 December 2024, 12 days ago

Problem/Motivation

Hi,

I'm running Drupal 10.3.10 with the latest Geolocation 8.x.3.14 ( using the Leaflet Maps ) on an Ubuntu Server 24.04 with Varnish Cache varnish-7.1.1 from the Ubuntu repository. Unfortunately, maps won't display when visiting the site as an anonymous user throwing the following Javascript error:

on Firefox: TypeError: L.CRS is undefined
on Chrome: TypeError: Cannot read properties of undefined (reading 'EPSG3857')

Maps do display when logged in though.

I've tried adding certain rules to vcl_recv so the paths to the js files provided by Geolocation don't get cached but no luck so it would be nice to have a rule for Varnish ( either 4.0 or 4.1 vcl ) as part of the documentation indicating how the maps can be displayed correctly or look if this is an actual issue on the js apis.

Here you can find the site with the issue for more reference: https://antrecu.com/random-pics/flower-12

Any help is really appreciated, thanks!

Steps to reproduce

Install Varnish 7 from the Ubuntu repository and configure the default.vcl with the instructions provided by: https://www.varnish-software.com/developers/tutorials/configuring-varnis...

🐛 Bug report
Status

Active

Version

3.14

Component

Javascript General / Frontend

Created by

🇪🇨Ecuador andres.torres

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

Comments & Activities

Production build 0.71.5 2024