omeka / plugin-Geolocation

Allows administrative users to save geolocation data for an individual item. The plugin generates a Google map containing items with geolocation data and a web page for displaying the map.
http://omeka.org/codex/Plugins/Geolocation
12 stars 20 forks source link

Geolocation Google map issue on Mac Chrome #38

Closed ksclarke closed 8 years ago

ksclarke commented 8 years ago

When using the map on the contribution form, there seems to be an issue with the Javascript on Mac Chrome. Chrome on other platforms (Linux, for instance) does not have the problem. This was working at one point, we believe, so wonder if something changed on Google's end. The problem:

One goes to the Contribution form and gets presented with a dropdown to select a type of contribution, when the the type of contribution that's selected has a map on it. The loading of that type's form (after selecting the type in the dropdown) fails because of a Javascript exception: Uncaught ReferenceError: google is not defined

This seems to be the issue here: https://stackoverflow.com/questions/14229695/google-maps-api-throws-uncaught-referenceerror-google-is-not-defined-only-whe

The contribution form is loading the specific type's additional form data via AJAX but it's failing on Mac's Chrome. Not sure why it doesn't affect Linux's Chrome. Any ideas on a workaround?

zerocrates commented 8 years ago

Is that the only console error, or is there anything else, like something failing to load? Geolocation should be loading the Maps API on every page, so google should be defined.

It'd be pretty odd to have a difference like this between Chrome on Mac and other platforms so I suspect something else is going on.

ksclarke commented 8 years ago

Yes, it is odd that it would only be on one Chrome. Safari on Mac works, fwiw. When the Javascript error happens, the item specific form stuff that should be loaded from the AJAX doesn't load so the page is just stuck at the drop down. There are no other Javascript errors and there is no problem with loading the map on the other pages (that I know of) just the contribution dropdown page.

zerocrates commented 8 years ago

Do you have an accessible URL that shows the problem?

ksclarke commented 8 years ago

You can create a guest user account at http://echode.org/ and try it out (the site isn't "live" so can be uploaded to, tested with, etc.) It's only on the Mac/Chrome combo as far as I know. I don't see the problem myself (don't have a Mac to test with).

The problem was reported when the "Photo" type was selected. I got the reporter to use Chrome tools to upload the console log which was where the "Uncaught ReferenceError: google is not defined" was seen.

I have made edits to the contribution process (added a drag and drop uploader, etc.) but have not touched the Geolocation stuff.

kimisgold commented 8 years ago

I just tested this with Chrome 51.0.2704.103 on 10.11.5 and had trouble replicating this; both the Story and Photo forms loaded as expected, map and everything. Photo form submitted successfully.

ksclarke commented 8 years ago

Hmm, okay, thanks @kimisgold. The reporter did say he did the standard things like clear the cache, hard refresh, etc. And that it was repeatable. Puzzled.

Edit: The reporter uses 51.0.2704.106 fwiw. I didn't ask which version of the OS but can.

ksclarke commented 8 years ago

@zerocrates I see you created an account too. Were you also not able to replicate the issue?

ksclarke commented 8 years ago

Oh, and it seems it's not just the contribution dropdown. I asked to confirm and he now doesn't see the map anywhere on the site when using Chrome on the Mac (though Safari on Mac is okay). I've confirmed he has all extensions disabled, Javascript turned-on, etc.

Edit: I don't suppose you all know of another site using the Geolocation plugin that I could point him to to see if he also has the problem there?

zerocrates commented 8 years ago

I created an account to look, but I'm not currently on a Mac so I'm not really evidence one way or the other.

zerocrates commented 8 years ago

My own "site" has an extremely sparse Geolocation setup if you want just anything.

ksclarke commented 8 years ago

Just to update, the user reports that his Mac/Chrome also cannot display the map on your site, @zerocrates. Thanks for providing it for testing of this issue.

zerocrates commented 8 years ago

Interesting data point. That being said, there's not a whole lot we can do at the moment if we can't reproduce the issue outside that particular machine.

ksclarke commented 8 years ago

Yes, understood. I'll probably go to the local university this weekend and try their Macs to see if I can reproduce.

mebrett commented 8 years ago

I'm using Chrome Version 51.0.2704.103 (64-bit) on a Mac running OS X 10.11.5 and I just contributed a picture of the Mill at West Point on the Eno. Had no problem with the Geolocation aspect. Fwiw.

ksclarke commented 8 years ago

Thanks @mebrett for another data point.

ksclarke commented 8 years ago

Closing this as unreproducible. I've been unable to confirm it either on Macs I've tested with.

deskstar commented 7 years ago

I face the same problem, but it only happens in MacOS Sierra (10.12) You can replicated the problem by using chrome in any machine running mac OS 10.12 with the following page https://www.tutorialspoint.com/html5/geolocation_getcurrentposition.htm

While safari able to retrieve the location, chrome fail (all plugin disabled and js enabled)