Bug reports Found a bug? Post it here please.
Version 7.x > Bug reports > StaticGoogleMaps addLoadEvent added to Template without the StaticGoogleMaps web part View modes: 
User avatar
Member
Member
fraser - 2/26/2013 3:29:55 PM
   
StaticGoogleMaps addLoadEvent added to Template without the StaticGoogleMaps web part
Hi there,

We have a particular Template that is adding the following:
<script type="text/javascript">
//<![CDATA[
addLoadEvent(MapLoad_p_lt_ctl02_pageplaceholder_p_lt_ctl02_Panels_Panels_3_StaticGoogleMaps);
//]]>
</script>

And:
<script src="/CMSPages/GetResource.ashx?scriptfile=%7e%2fCMSWebParts%2fMaps%2fStatic%2fStaticGoogleMaps_files%2fGoogleMaps.js" type="text/javascript"></script>

But...there is no StaticGoogleMaps WebPart on the Template!

The "addLoadEvent" is causing JavaScript errors whenever the page loads.

I am wondering if perhaps we removed the StaticGoogleMaps web part and it was not completely removed from the template. If this is the case, where can we look to get rid of it?

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 2/27/2013 1:42:41 AM
   
RE:StaticGoogleMaps addLoadEvent added to Template without the StaticGoogleMaps web part
Hello,

could you post the error message it is giving you?

It may the cause as you stated, if this is some sort of "hidden" error as you cant find the source in your template the easy solution here might be to create a new template copy & paste what you want from the old one and start using the new one. This might resolve the issue.

Best regards,
Richard Sustek

User avatar
Member
Member
fraser - 2/27/2013 8:13:24 AM
   
RE:StaticGoogleMaps addLoadEvent added to Template without the StaticGoogleMaps web part
The error message is:
SCRIPT5009: 'MapLoad_p_lt_ctl02_pageplaceholder_p_lt_ctl02_Panels_Panels_3_StaticGoogleMaps' is undefined

I can try to re-build the template, but would prefer to fix if possible. Is there anywhere in the DB tables I could look?

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 2/27/2013 8:28:38 AM
   
RE:StaticGoogleMaps addLoadEvent added to Template without the StaticGoogleMaps web part
Hello,

You may look into db table CMS_PageTemplate in column PageTemplateWebParts to see if anything that might be causing this issue is there.

Also - does the google map webpart works corretly in other pages? I'm asking to find out if there is some issue with the webpart itself, but that is unlikely since if you have not made any changes to it.

Re-building the template could be the easy solution, if there are no issues elsewhere.

Best regards,
Richard Sustek

User avatar
Member
Member
fraser - 2/27/2013 8:59:20 AM
   
RE:StaticGoogleMaps addLoadEvent added to Template without the StaticGoogleMaps web part
I think we have it figured out.

The parent in the tree DOES have a StaticGoogleMaps web part. So although the page in question does not have a StaticGoogleMaps web part it seems to be inheriting the code from the parent.

We'll look into a work around.

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 2/27/2013 9:06:46 AM
   
RE:StaticGoogleMaps addLoadEvent added to Template without the StaticGoogleMaps web part
Okey, thank you for sharing that information.

Let us know if you stumble onto some issue.

Best regards,
Richard Sustek