---
title: "Important: The partner map draws when its script loads late"
manual: "Academic Partners"
version: "main"
permalink: "https://docs.typo3.org/permalink/fgtclb/academic-partners:important-partner-map-draws-on-late-module-load@main"
source: "Changelog/2.4/Important-PartnerMapDrawsOnLateModuleLoad.rst"
rendered: "2026-10-26T19:20:19+00:00"
---

# Important: The partner map draws when its script loads late {#important-partner-map-draws-on-late-module-load}

## Description {#description}

The script of the partner map,
`EXT:academic_partners/Resources/Public/JavaScript/frontend/map.js`, bound
its whole body to `document.addEventListener('DOMContentLoaded', ...)`
without asking whether that event was still ahead of it. A script that runs
after the document has been parsed registered its listener on an event that
never comes again: the map container stayed empty, without tiles and markers,
and nothing was reported, neither in the browser console nor in the TYPO3 log.

The template shipped with the extension loads the script with
`<f:asset.script>` and without `async`, as a classic script that
runs while the document is parsed. It was therefore not affected. A script
loaded with `async`, or injected after parsing by a consent manager or a
tag manager, was.

The body now runs immediately when the document has finished parsing, and
waits for `DOMContentLoaded` only while it has not.

## Impact {#impact}

The map draws however the script is loaded. An installation that renders the
map with the shipped template sees no difference.

## Affected Installations {#affected-installations}

Installations that load the map script asynchronously or late, through a
template override or their own asset handling. Nothing has to be done on
update. A workaround that forced the script to load early can be dropped.
