I'm getting the following error in my console:
GET https://www.mysite.com/files/js/gmap_markers.js net::ERR_ABORTED 404 (Not Found)
It looks like this is because _gmap_base_js() does not check if the file exists before including it.
I recommend the following change:
$marker_path = base_path() . variable_get('file_public_path', conf_path() . '/files') . '/js/gmap_markers.js';
if (!file_exists($marker_path)) {
gmap_regenerate_markers();
}
$ret[$marker_path] = array(
'type' => 'external',
'weight' => 4,
);
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | gmap-markers-not-found-3025489-4.patch | 711 bytes | _KurT_ |
| #2 | gmap_markers_not_found-3025489.patch | 1.67 KB | viasamsonov |
| gmap_markers_not_found.patch | 593 bytes | jenlampton |
Comments
Comment #2
viasamsonov commentedLooks like your patch is not compatible with the current version since _gmap_base_js() is deprecated and the module uses GmapDefaults::getInstance()->getBaseJs()
This is the code that fixed this issue for me (version 7.x-2.11)
Comment #3
_KurT_ commentedComment #4
_KurT_ commentedComment #5
_KurT_ commentedDon't know how to fix those errors in php test.
Comment #6
trogie commentedMe neither but the patch works for me.