Google Maps Stopped Inserting

User avatar
Timespider
Posts: 37
Joined: 2010-02-16 22:15
Location: Auckland - New Zealand

Google Maps Stopped Inserting

Post by Timespider » 2012-01-10 00:55

Hi guys, & happy 2012, I don't know if I've asked this here so I'll ask anyway.

I have a nextensio form that inserts/updates all sorts of data including google maps like this

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.nz/maps?q=the+far ... iframe><br /><small><a href="http://maps.google.co.nz/maps?q=the+far ... urce=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>

It was working fine but has now stopped working. It is only the google maps that won't work. All other data(text/images/files) will insert/update but when I stick in any map like the above it says that I'm forbidden to access the page. Has anyone encountered this issue? I have all the patches installed.

Thanks Chris
Motto: STUPID HURTS

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: Google Maps Stopped Inserting

Post by Fred » 2012-01-12 11:57

Hi Chris,
All the best for the new year for you as well.

The only thing that I can thing of is that maybe the mod_sec rules or something similar was updated on your server preventing you from updating.
Can you look at the error logs and see if it says something or ask the host to look at the server logs.

I am using google maps as well but only stores the lats and longs in the database.
Then simply injects the two values into the iframe when the page is rendered.
Added benefit is that all the rendered pages looks exactly the same in terms of the size of the iframe

User avatar
Timespider
Posts: 37
Joined: 2010-02-16 22:15
Location: Auckland - New Zealand

Re: Google Maps Stopped Inserting

Post by Timespider » 2012-01-13 10:26

Hi Fred, pheeeew.

I have looked for ages on this issue & it seems it is the mod_sec rules. So I have changed my code. For anyone else who has this problem I changed the insert/update field for the map from the whole iFrame to just the location. Then hard coded the iFrame into the page the maps shown on & echoed that location like shown below.

Code: Select all

<iframe width="640" height="450" frameborder="0" scrolling="No" marginheight="0" marginwidth="0" src="http://maps.google.co.nz/maps?ie=UTF8&aq=f&oq=&q=<?php echo "$mapaddress".","."New Zealand" ?>&hq=&hnear=<?php echo "$mapaddress".","."New Zealand" ?>&t=m&vpsrc=6&ll=&spn=0.504458,0.878906&z=10&iwloc=A&output=embed"></iframe>
Thanks once again Fred, I was pulling my hair out
Motto: STUPID HURTS

Post Reply