I have been struggling to get the static image to show. Several times I have had it working only to have it disappear again. Today I inspected the broken image icon with Google Chrome and I think I might have found the problem. Chrome says that the server (their server) is forbidding the image.
Here's what Chrome said, "Failed to load resource: the server responded with a status of 403 (Forbidden)".
The weird part is that the map image shows up fine on the actual Location Map page. Only the static image is broken.
I just installed the newest build today after uninstalling the module, flushing the caches twice, and deleting the Location Map folder via FTP.
Does anyone have any ideas?
Comment | File | Size | Author |
---|---|---|---|
#4 | locationmap-fix-block-image-1489042-4.patch | 724 bytes | rupertj |
Comments
Comment #1
rupertj CreditAttribution: rupertj commentedI get the same, although only on some requests. If I hit refresh it displays after a while and then seems to stay there. I'm wondering if this is something on Google's end - IE the image comes back as a 403 if it can't generate fast enough, and then once they've generated it, it'll display ok from then on. I'll have a look at if there's a more reliable way of generating that map.
Comment #2
rupertj CreditAttribution: rupertj commentedActually, what I posted before isn't right. What's happening is this:
1) Try to display map in site - get 403.
2) Go to map image URL directly in browser to see what's going on - map displays.
3) Map displays correctly in site from then on (cached in browser?).
4) Change the map location, and the cycle continues...
Comment #3
ericjan CreditAttribution: ericjan commentedSame here. Firebug is telling me: "NetworkError: 403 Forbidden - http://maps.google.com/staticmap?......". Where the image should be, only a link is shown: Location map. In Chrome I see a clickable image placeholder instead of a link.
Comment #4
rupertj CreditAttribution: rupertj commentedThe static maps API docs make the request to a different URL, with an additional sensor param. Give the attached patch a try - It works for me, but I'd like to make sure this isn't some fluke :)
Comment #5
rupertj CreditAttribution: rupertj commentedComment #6
Danny EnglanderI've tested this patch and it worked to solve my issue, the map is now displaying properly.
Comment #7
dukem CreditAttribution: dukem commentedWorked for me too.
Comment #8
rupertj CreditAttribution: rupertj commentedI've made 2.1 & 1.3 releases, which both contain this fix. Thanks all!
Comment #9
StaticBelow CreditAttribution: StaticBelow commentedThis fixed it. Thank you Rupertj.
Comment #10
Vacilando CreditAttribution: Vacilando commentedI still frequently see the infamous error page instead of a static image, even in 7.x-2.1 and in latest dev :-(
Comment #11
rupertj CreditAttribution: rupertj commentedIf you want help, you should open a new issue. This one's been closed for ages, and your problem's unlikely to be the same as the one in this issue.
Comment #13
rmfranciacastillo CreditAttribution: rmfranciacastillo as a volunteer and commentedI've had this same error with Drupal 8.2.4. All I did was redo my cache with "drush cr".
Solved it. :)