I'm experiencing a problem displaying Leaflet maps on my site when using a DXPR-based subtheme. This issue affects anonymous users.

Problem description:

When using a custom DXPR subtheme, even a blank one, the Leaflet map container remains empty, and the associated JavaScript code doesn't seem to execute or initialize.

Key observations:

Behavior: The map doesn't load, and the JavaScript responsible for displaying it isn't triggered.

Consultation: If I switch to the Bootstrap Barrio theme, the Leaflet map loads correctly for anonymous users. This confirms to me that the problem doesn't originate from the Leaflet module itself, but from how the DXPR subtheme handles resource loading or Drupal settings for anonymous users.

Context: The site runs on Drupal 11.3.10

Technical details:

I have verified that all necessary dependencies are declared in the subtheme's `.libraries.yml` file.

It appears that DXPR's resource loading mechanism interferes with the execution of third-party JavaScript libraries or does not provide the necessary environment for their proper mounting.

Important note: The Leaflet map loads correctly for anonymous users on the parent DXPR theme.

Comments

chsdaiguil created an issue. See original summary.

chsdaiguil’s picture

chsdaiguil’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.