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

rupertj’s picture

Status: Active » Postponed (maintainer needs more info)

Have 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.

Po3t’s picture

I'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:

<div id="locationmap_body"></div>
<div id="locationmap_map" style="width: 600px; height: 450px"></div>
<div id="locationmap_footer"></div>
Po3t’s picture

I'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?

rupertj’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

You'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.

Po3t’s picture

Status: Closed (works as designed) » Postponed

That 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?

farid.yousif’s picture

I am having the exact same issue on www.stortorvets-gjestgiveri.no/nb/finn-oss

rupertj’s picture

Status: Postponed » Closed (works as designed)

Farid - 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.

farid.yousif’s picture

Ok, 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.

rupertj’s picture

Farid - 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?

farid.yousif’s picture

I 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!

rupertj’s picture

No problem :) Glad you got there.

carlodimartino’s picture

I'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

Vacilando’s picture

Same problem ("jQuery is not defined"). Also have Superfish module installed on the site -- did you find any solution, @rectangle?

Gib...’s picture

Version: 7.x-2.1 » 7.x-2.3
Issue summary: View changes
Status: Closed (works as designed) » Active

Hi,

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

John Franklin’s picture

Status: Active » Closed (cannot reproduce)

I 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.