I'm not exactly sure what to include in this bug report, as I have no idea what's causing this problem, but I have the static map block enabled in one of my regions, but when you click on the map to open the "/locationmap" page, the interactive google map doesn't display. All I get is a blank screen.
Is it possible that this module has a conflict somewhere with another module? The only module I've installed recently is the "Block Class" module. I tried disabling it, but it didn't change anything.
I've included an address in the Google Maps Location configuration page. The static image displays perfectly fine. it's only the interactive map page (locationmap) that appears to be broken.
Comments
Comment #1
rupertj CreditAttribution: rupertj commentedHave a look in your PHP & webserver error logs after you've loaded the page in question. There's most probably a error message in there that'll let us know exactly what's going wrong here.
Comment #2
Po3t CreditAttribution: Po3t commentedI'm not sure what I can give you here. I'm not getting an error messages having to do with the locationmap page in my webserver's error log or the PHP error_log. This is the page with the problem: http://adbeng.tekalsites.com/locationmap
I'm developing the site for a client. The Contact page displays the static image of the map fine, but when it's clicked on, all I get is an empty block. Where the map is supposed to be rendered, all that's displayed is this when inspected:
Comment #3
Po3t CreditAttribution: Po3t commentedI'm having some strange issues with my database, so that may be causing problems. What is the database table for this module so I can take a look there?
Comment #4
rupertj CreditAttribution: rupertj commentedYou've got a JS error on that page caused by something else that you should fix first:
TypeError: $("body", context).once is not a function
http://adbeng.tekalsites.com/sites/default/files/js/js_43n5FBy8pZxQHxPXk...
Line 234
This will stop any other JS on the page working, like the map.
Comment #5
Po3t CreditAttribution: Po3t commentedThat doesn't make sense to me. The javascript drop-down menu still works on that page. I don't know if there's much I can do about that either since it's an automatically generated javascript file created by the omega theme. So does that mean that this module won't work with the Omega Theme?
Comment #6
farid.yousif CreditAttribution: farid.yousif commentedI am having the exact same issue on www.stortorvets-gjestgiveri.no/nb/finn-oss
Comment #7
rupertj CreditAttribution: rupertj commentedFarid - you've got the same cause. Fix the JS errors in your site and you should find the map works.
Po3t - Your menus probably work as they're set up before the error happens. Omega and locationmap should be able to work together just fine, but I don't know anything about how Omega works, so can't help you with it. Try filing a support request with the Omega project.
Comment #8
farid.yousif CreditAttribution: farid.yousif commentedOk, I think I managed to find the Errors using Firebug, but after addressing them the issue remained. Oddly enough, the location map block is working as it should.
Comment #9
rupertj CreditAttribution: rupertj commentedFarid - I'm still getting one JS error on your site, which is:
ReferenceError: jQuery is not defined
http://www.stortorvets-gjestgiveri.no/sites/all/modules/locationmap/loca...
Line 45
From the looks of it, this is because locationmap's js is being included in the page before jQuery. (Hence the "jQuery is not defined").
This is the code that locationmap uses to add the js to the page:
drupal_add_js($path . '/locationmap.js', array('type' => 'file', 'weight' => 6, 'scope' => 'footer'));
Is it possible your theme is adding the footer js before the others? If not, could you post the code your theme's using to print the js?
Comment #10
farid.yousif CreditAttribution: farid.yousif commentedI figured it out and you helped me get there.
Recently I moved the scripts to the end of the page in a desperate attempt to speed up the page (still not sure if it worked, but YSlow is telling me that it did). I moved them to just above the $page_bottom and there it was. The map.
Thank you very much for your help rupertj!
Comment #11
rupertj CreditAttribution: rupertj commentedNo problem :) Glad you got there.
Comment #12
carlodimartino CreditAttribution: carlodimartino commentedI'm having the same problem and I know which other module is causing the problem. It's when I enable https://drupal.org/project/superfish I'd really like to get both modules working at the same time
Comment #13
Vacilando CreditAttribution: Vacilando commentedSame problem ("jQuery is not defined"). Also have Superfish module installed on the site -- did you find any solution, @rectangle?
Comment #14
Gib... CreditAttribution: Gib... commentedHi,
Sorry, but I have the exact same issue (Drupal 7.31; 7.x-2.3; Bartik). I do not change anything with scripts.
http://www.mpcmontreal.org/?q=en/locationmap
JS errors in Firebug are :
TypeError: $.browser is undefined
...),this.firstChild);});}return this;};if(!$.browser.version)$.browser.version=nav...
js_-pHq...ESzY.js (ligne 11, col. 1061)
TypeError: Drupal.ajax is undefined
...rupal.ajax.prototype.commands.viewsScrollTop = function (ajax, response, status)...
js_hu-L...O9l8.js (ligne 738)
TypeError: $.browser is undefined
if ($.browser.msie && parseInt(jQuery.browser.version) == 6) {
Comment #15
John Franklin CreditAttribution: John Franklin commentedI see those same errors on your home page, which doesn't have the Location Map block. I also don't see the /locationmap page, which probably means it is disabled. If the errors persist even without the module enabled, it's not from Location Map.