Hi,

I have deployed the site from my laptop to a live server and noticed that GMap markers are not there any more. I have done some search among the issues and found that some recommend to change file permissions on gmap_markers.js or some other settings if the server does nor support clean URLs
None of these helped.
I am using Drupal 6.19 GMap 6.x-1.1 clean URL supported.

Could you please help?

Comments

aravindpudayoor’s picture

Same problem here...its working fine in localhost

Could u please help?

Thank you in advance

kbk’s picture

I've got this problem too but my markers are still there, they're just invisible!? I can click on one and the info window pops-up but I cannot see the marker!

Work arounds I've tried:
- Works: Setting the Base URL in settings.php
- Doesn't work: Setting /sites/default/files/js permissions (they were already correct)
- Doesn't work: gmap_module_invoke patch (different problem?)
- Doesn't work: Patch drupal.sh (wha? )

To the previous posters, does the Base URL change work for you? Are your markers there but not visible?

Other notes, the problem appeared to begin after running cron but I had also just installed gmap_addons to try that module out.

zosta’s picture

Thanks.
I am trying to set base URL in settings.php but that does not solve the problem so far. I keep my test site in the /test folder and maybe that is the issue. The markers are still invisible eventhough there are links on the map in the righ place (just invisible...)

I'll keep trying. Please keep sending suggestions.

my site:
http://59nord.vot.pl/test/mariny
There should be 3 markers visible.

zosta’s picture

Success!!!

If you check the site i linked above the markers are back! All I had to do was to update sites/default/settings.php with the following:
$base_url = 'http://59nord.vot.pl/test'; // NO trailing slash!

(that is of course valid only for my site)
and than run cron.
That solves the issue. Thanks.

kbk’s picture

Title: GMap markers not visible after deployment to live server » GMap markers present but not visible - site running in subdirectory
Status: Active » Closed (fixed)
Issue tags: +drush, +cron, +cache

I'm operating in a subdirectory too. My understanding is that the Drupal.gmap.iconpath variable in sites/default/files/js/gmap_markers.js must represent this:

Drupal.gmap.iconpath = "/sites/all/modules/gmap/markers"; --> invisible markers!
Drupal.gmap.iconpath = "/subdirectory/sites/all/modules/gmap/markers"; --> Markers visible!

As a side note, I noticed that running cron or clearing the cache via the web (e.g., admin/reports/status/run-cron) doesn't touch gmap_markers.js whereas running cron via drush (e.g., $ drush cron, $ drush cc) does. This means a drush cron or cache clear will remove the subdirectory if the Base URL isn't set.

jur4x’s picture

Had the same problem, clearing cache in admin/settings/performance helped.

mrP’s picture

I'm having the same problems and have tried all the recommended solutions. Base_URL was updated, cleared cache at multiple points, ran cron, regenerated markers, tried alternative marker managers, and used devel to reinstall gmap....nada

To be specific, when I edit a node, gmap/location correctly identify the long/lat for an address, center and zoom map on location, but does not display marker. Any other time I load the gmap (such as in a view) it just goes to the default location.

Worst part is, everything was working great and then just stopped all of the sudden. I wasn't paying real keen attention to the markers because they were working fine but I noticed a couldn't write file to /tmp/fileWwclY error at one point. I have since checked permissions and verified all is well there...the error has not occurred again.

As an FYI, at cron run I'm getting a foreach() .... taxonomy.module on line 1242 (followed http://drupal.org/node/839654 with no success).

mrP’s picture

Status: Closed (fixed) » Active
smscotten’s picture

subscribing. Markers have disappeared from all my sites (multiple installations) without my intervention. Not sure when that happened but didn't notice until today. Perhaps conflict with some other module update?

Gold’s picture

I've got a client site that is having this issue also. I've tracked it down to the Drupal.gmap.iconpath value set in the gmap_markers.js file.

The quick check to see if this is the issue would be to hit a page with a broken map and inspect it with something like Firebug. Hit the Net tab and see if you can spot a 404 on the URL to the pin image.

What I've found is that this image is being referenced via the path from the root of the machine instead of the root of the server.

e.g.;
http://example.com/var/www/example.com/sites/all/modules/gmap/markers/bl...
instead of
http://example.com/sites/all/modules/gmap/markers/blue.png

I'm currently tracking down why and when this happens. Why it happens is clear. Something to do with the selection of the path. When it happens is interesting as I've not found any pattern to it and my eyes are starting to bleed from watching the tail of log files scroll past.

Anyway, if you're still experiencing this I'd love to have you check it out on your site and let me know if this is the same issue you have.

seanburlington’s picture

I had this problem in 7.x-1.x-dev

I believe this occurred because I installed the site with a custom profile using drush

Drush is not aware that Apache will see Drupal as being installed in a subdirectory - and so the initial build of gmap_markers.js has the wrong URL

I think this is a bug/limitation in Drush

clearing caches fixed the problem for me

richH’s picture

Hi,

I kept getting a 404 not found on my markers (see log file on your drupal reports) and I had cleared my cache, run cron and done a headstand and I kept getting it.

In the end I went into sites/default/files/js/gmap_markers.js and changed the line from :

Drupal.gmap.iconpath = "/home/example/www/www/sites/all/modules/gmap/markers";

to
Drupal.gmap.iconpath = "/sites/all/modules/gmap/markers";

In other words, I made the path relative to the URL and not the filesystem.

Hope this helps
rich

richH’s picture

Hi,

does anyone have an idea how to stop the relative URL being overwritten with the file path?

I've been experimenting by changing line 535 in /sites/all/modules/gmap/gmap.module and replacing base_path() with '/'.

from

$contents .= "Drupal.gmap.iconpath = " . drupal_to_js(base_path() . variable_get('gmap_markerfiles', drupal_get_path('module', 'gmap') . '/markers')) . ";\n";

to

$contents .= "Drupal.gmap.iconpath = " . drupal_to_js('/' . variable_get('gmap_markerfiles', drupal_get_path('module', 'gmap') . '/markers')) . ";\n";

I don't reaaaaaly know what base_path() does but the first tests look good. I'm not running anything in a subdirectory though.

Thanks
Rich

marcjohnson’s picture

Fixed!

Edited sites/default/files/js/gmap_markers.js

Drupal.gmap.iconpath = "/sites/all/modules/gmap/markers"; --> invisible markers
Drupal.gmap.iconpath = "sites/all/modules/gmap/markers"; --> visible markers

Removing the leading slash makes it a relative path instead of absolute.

This should be fixed in the codebase... hardcoding to an absolute path is a bug.

kenorb’s picture

Category: support » bug

This has been fixed in 7.x as gmap_markers.js file generated dynamically.

kenorb’s picture

Priority: Normal » Minor
Issue summary: View changes