Title says it all: I found that maps are not displayed when block caching is enabled. This is due to the fact that Openlayers JS scripts and inline data are not added to the HEAD section of the page when the block is fetched from cache.

Comments

plach’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new461 bytes

Here is a quick fix.

The proper fix is probably returning a renderable array with the needed resources #attached.

plach’s picture

StatusFileSize
new1.29 KB

Something like this (seems to be working properly here).