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,
  );

Comments

jenlampton created an issue. See original summary.

viasamsonov’s picture

StatusFileSize
new1.67 KB

Looks 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)

_KurT_’s picture

StatusFileSize
new710 bytes
_KurT_’s picture

StatusFileSize
new711 bytes
_KurT_’s picture

Status: Active » Needs review

Don't know how to fix those errors in php test.

trogie’s picture

Me neither but the patch works for me.