Map not showing for anonymous users

Created on 22 September 2020, over 4 years ago
Updated 18 January 2025, 5 days ago

Problem/Motivation

I created a simple Leaflet Map with the widget but only logged-in users can see it, and after playing a lot with permissions I doubt this is a permission issue.

Steps to reproduce

I have an "event" content type with an address and geofield fields
The address is generating coordinates to my geofield:

Then I configure the Leaflet Map widget taking default parameters:

And in my twig template rendering the field so: {{content.field_coordinates}}

This works perfectly for me as I'm logged in, but anonymous can't see anything:
http://gq5woadslj.preview.infomaniak.website/events/ivamus-tortor-metus-...

💬 Support request
Status

Fixed

Version

2.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Hello @letrollpoilu
    I'm facing the same issue as yours today as the leaaflet map is displayed in an authenticated session but not when I'm opening the page (permissions OK) in an anonymous session.
    On your last comment, you're explaining the solution but the code in html.html.twig is the same as the code you're fixing.
    So, what is the final solution ? May I have to report <js-bottom-placeholder token="{{ placeholder_token }}"> in another template ?
    Thank you by advance for your help.

Production build 0.71.5 2024