{"id":61,"date":"2008-08-06T16:52:59","date_gmt":"2008-08-06T21:52:59","guid":{"rendered":"http:\/\/osric.com\/chris\/accidental-developer\/?p=61"},"modified":"2008-08-07T22:31:05","modified_gmt":"2008-08-08T03:31:05","slug":"weird-issue-between-smarty-and-google-maps","status":"publish","type":"post","link":"https:\/\/osric.com\/chris\/accidental-developer\/2008\/08\/weird-issue-between-smarty-and-google-maps\/","title":{"rendered":"Weird Issue between Smarty and Google Maps"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/osric.com\/chris\/accidental-developer\/wp-content\/uploads\/2008\/08\/smarty-logo-orange.gif\" style=\"max-width: 800px\" align=\"right\" \/>I&#8217;m doing some work on a site that uses the google maps API (which is clean, simple and absolutely fabulous, by the way) and I have bumped into a strange problem. When I draw the page that uses the google maps api with smarty everything works fine, generally. However if I put the {debug} tag into the template (which causes smarty to give you a nice little pop-up window of all of the variables it&#8217;s working with, and some other great info) google maps stops working.<\/p>\n<p>This isn&#8217;t really that shocking, since there is a bunch of javascript that gets pushed into the page by debug, what is weird, and a pretty large problem is that once I do this, google maps continues not to load, even after the {debug} tag has been removed. I haven&#8217;t really dug into what is going on to carefully yet, but its an interesting issue.<\/p>\n<p><em>Really lame solution found after the jump <\/em><\/p>\n<p><!--more-->Well, I dug into it, and as it turns out, it was not a problem with the debug statement at all. Rather it was an issue because I had done some line formatting in the javascript that called google maps, and put in some carriage returns in the middle of a string. (that string was producing HTML so I didn&#8217;t mind having some whitespace in the output). It turns out that this was what was making the map API puke. Just goes to show&#8230; make sure you have isolated the problem correctly!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m doing some work on a site that uses the google maps API (which is clean, simple and absolutely fabulous, by the way) and I have bumped into a strange problem. When I draw the page that uses the google maps api with smarty everything works fine, generally. However if I put the {debug} tag &hellip; <a href=\"https:\/\/osric.com\/chris\/accidental-developer\/2008\/08\/weird-issue-between-smarty-and-google-maps\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Weird Issue between Smarty and Google Maps<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-61","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/61","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/comments?post=61"}],"version-history":[{"count":0,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/61\/revisions"}],"wp:attachment":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/media?parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/categories?post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/tags?post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}