Smarty error with CGGoogleMaps

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
lucia22
Forum Members
Forum Members
Posts: 47
Joined: Tue Jul 20, 2010 11:03 am

Smarty error with CGGoogleMaps

Post by lucia22 »

Having trouble with the CG GoogleMaps module.

I am running 1.9.3 and the latest version of CG Googlemaps.

At first I added a map with no markers and it displayed ok. Then added a marker and the map did not display just white space with the marker details showing. I tried all sorts of combinations eventually turning off the streetmap option tool on the map made the map display with the marker on however now I have the following smarty error:

string(154) "Smarty error: [in module_db_tpl:CGGoogleMaps;mapjs_1 line 322]: syntax error: unrecognized tag: $map->sv_radius:1000 (Smarty_Compiler.class.php, line 446)" string(135) "Smarty error: [in module_db_tpl:CGGoogleMaps;mapjs_1 line 322]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"

Also I wanted the list of markers to appear underneath the map but just as a link to click to display the details as an overlay on the map, I had a picture of the venue included within it, however at the moment they display on the left but instead of it being just a list of links there is a link then underneath is shows the pictures? I am guessing if I play around with the template I can get it to display the list underneath but how do I stop it showing the full details in the list?

Any help you can give would very gratefully be received!
lucia22
Forum Members
Forum Members
Posts: 47
Joined: Tue Jul 20, 2010 11:03 am

Re: Smarty error with CGGoogleMaps

Post by lucia22 »

Anyone have any ideas what the smarty error is about? Help!!
blackhawk
Power Poster
Power Poster
Posts: 280
Joined: Mon Oct 20, 2008 6:07 pm

Re: Smarty error with CGGoogleMaps

Post by blackhawk »

It's a syntax error. maybe you are missing quotes? or an open/closed tag? check the documentation to see if you are using the correct format. If so, and you still can't figure it out, then just install google maps directly from google instead of using this module.
lucia22
Forum Members
Forum Members
Posts: 47
Joined: Tue Jul 20, 2010 11:03 am

Re: Smarty error with CGGoogleMaps

Post by lucia22 »

Not sure where you mean. I have the standard templates used that comes with CGGooglemaps. I have added my venue map and markers then in my page I have {CGGoogleMaps map="venues"}

Where would the syntax be wrong? In the actual code for the module? In which case I wouldn't know where to start looking. I haven't changed anything so surely others would have come across the same problem.

The strange thing is I can refresh the page a couple of time and the smarty error goes....is this just the nature of the smarty error codes though?

I am not sure what you meant by installing direct from googlemaps?? I want to use the CGGoogleMaps module as it has the wysiwyg editor for the markers
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: Smarty error with CGGoogleMaps

Post by Jos »

Maybe you incidentaly removed a {literal} tag somewhere?
lucia22
Forum Members
Forum Members
Posts: 47
Joined: Tue Jul 20, 2010 11:03 am

Re: Smarty error with CGGoogleMaps

Post by lucia22 »

I didn't think I had changed anything in the templates, however I have gone through and reset them all to factory defaults, refreshed my page several times and so far no error so hoping thats fixed it! fingers crossed, thanks!
lucia22
Forum Members
Forum Members
Posts: 47
Joined: Tue Jul 20, 2010 11:03 am

Re: Smarty error with CGGoogleMaps

Post by lucia22 »

Aaaaah spoke to soon, its back!

Don't know what else to do as I have reset all the templates to defaults etc
User avatar
antiheld2000
Forum Members
Forum Members
Posts: 236
Joined: Thu Jan 31, 2008 9:23 am

Re: Smarty error with CGGoogleMaps

Post by antiheld2000 »

I have the same problem and no solution. Anyone something new about this?
User avatar
blast2007
Power Poster
Power Poster
Posts: 508
Joined: Wed Aug 01, 2007 5:36 pm

Re: Smarty error with CGGoogleMaps

Post by blast2007 »

Same here, but problem is shown randomly. Not at every page loading but only sometimes.

regards
blast
lucia22
Forum Members
Forum Members
Posts: 47
Joined: Tue Jul 20, 2010 11:03 am

Re: Smarty error with CGGoogleMaps

Post by lucia22 »

Yes its very frustrating, its random for me, so I try tweaking the settings, think I have fixed it then it returns !!!

Please does any no of a fix? For the moment I have had to go back to the GoogleMaps version which it states is marked as stale and this version doesn't have as good functionality as the CG one which is a shame.
musicscore
Power Poster
Power Poster
Posts: 498
Joined: Wed Jan 25, 2006 11:53 am

Re: Smarty error with CGGoogleMaps

Post by musicscore »

Same problem here.
I upgrade googlemaps to the latest version, did reset al the templates. Please, please, please ...... does anyone has a solution.

Musicscore
User avatar
myshko
Forum Members
Forum Members
Posts: 102
Joined: Wed Feb 07, 2007 2:36 pm

Re: Smarty error with CGGoogleMaps

Post by myshko »

Hi,

Seems like a JS / Jquery issue. Are there any errors or warnings in firebug / browser error console?

In your 'Javascript Template', do you have the {jsmin} tag at the top?

Are you calling any other unusual scripts / js libraries?

If yes, try taking them all out, adding them back one at a time and changing the order.

Sometimes multiple jquery calls clash.

Hope that helps.

/m
musicscore
Power Poster
Power Poster
Posts: 498
Joined: Wed Jan 25, 2006 11:53 am

Re: Smarty error with CGGoogleMaps

Post by musicscore »

myshko

Thanks for your quit reply.

I have {jsmin} in my template :

Code: Select all

{* javascript template *}
{jsmin}
<__script__ type="text/javascript" charset="utf-8" {$map_defertxt}>{literal}
//<![CDATA[
if( typeof(jQuery) == 'undefined' ){
  alert('JQuery is required for this map to function');
}
jQuery(document).ready(function(){
Googlemaps is the only js I have on that site.

Some advise ??

Musicscore
User avatar
myshko
Forum Members
Forum Members
Posts: 102
Joined: Wed Feb 07, 2007 2:36 pm

Re: Smarty error with CGGoogleMaps

Post by myshko »

This might work,

In your 'Javascript Template', right down at the bottom, look for this if statement:

Code: Select all

{if $map->sv_controls}
    var tmp =mapObj.getStreetView();
    var client = new google.maps.StreetViewService();
    client.getPanoramaByLocation(marker.getPosition(), {$map->sv_radius|default:1000}, function(result, status) {ldelim}
    if (status == google.maps.StreetViewStatus.OK) {ldelim}
      document.getElementById('cggm_sv_display_'+mapID).style.display='block';
      tmp.setPosition(result.location.latLng);
    {rdelim}
    {rdelim}); 
{/if}
And delete it all. See if it helps. It will mean street view won't work however.

I can't recreate the scenario without specific settings, so it's hard to give more specific suggestions.

/m
musicscore
Power Poster
Power Poster
Posts: 498
Joined: Wed Jan 25, 2006 11:53 am

Re: Smarty error with CGGoogleMaps

Post by musicscore »

Thank you, myshko,

That worked. So it's the streetview function that created the problem. I think you are an expert. :o

Thanx again.

Musicscore
Post Reply

Return to “Modules/Add-Ons”