Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
aravindpudayoor CreditAttribution: aravindpudayoor commentedSame problem here...its working fine in localhost
Could u please help?
Thank you in advance
Comment #2
kbk CreditAttribution: kbk commentedI'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.
Comment #3
zosta CreditAttribution: zosta commentedThanks.
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.
Comment #4
zosta CreditAttribution: zosta commentedSuccess!!!
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.
Comment #5
kbk CreditAttribution: kbk commentedI'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.
Comment #6
jur4x CreditAttribution: jur4x commentedHad the same problem, clearing cache in admin/settings/performance helped.
Comment #7
mrP CreditAttribution: mrP commentedI'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).
Comment #8
mrP CreditAttribution: mrP commentedComment #9
smscotten CreditAttribution: smscotten commentedsubscribing. 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?
Comment #10
GoldI'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.
Comment #11
seanburlington CreditAttribution: seanburlington commentedI 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
Comment #12
richH CreditAttribution: richH commentedHi,
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
Comment #13
richH CreditAttribution: richH commentedHi,
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
to
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
Comment #14
marcjohnson CreditAttribution: marcjohnson commentedFixed!
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.
Comment #15
kenorb CreditAttribution: kenorb commentedThis has been fixed in 7.x as gmap_markers.js file generated dynamically.
Comment #16
kenorb CreditAttribution: kenorb commented