Page 1 of 1

Google Maps Stopped Inserting

Posted: 2012-01-10 00:55
by Timespider
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

Re: Google Maps Stopped Inserting

Posted: 2012-01-12 11:57
by Fred
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

Re: Google Maps Stopped Inserting

Posted: 2012-01-13 10:26
by Timespider
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