Jump to content

Smarty Compiler Fatal error


robynd

Recommended Posts

I have a ticket out to the module developer; but he's slow to respond so I thought there may be some help here. 

 

Getting a 500 error on single blog posts:

https://www.wescoturf.com/blog/training-events/fall-2016-wesco-turf-university

 

The function was working. This showed up after I was experimenting with cloudfront cdn. The only thing I did that may have caused this was set the media server to our new cname and test it. All css broke so I reverted. I think that may have triggered something?

 

Debug shows:

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/home/wescot5/public_html/modules/ph_simpleblog/views/templates/front/single.tpl" on line 189 "</script>" unclosed {if} tag <-- thrown in /home/wescot5/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 189

 

I'm using 1.6.0.13

I've cleared the cache in the Backoffice and looking at the files, it looks like it's clear. The only thing I haven't done is force a recompile. 

 

I'm a newbie to Prestashop that inherited this beast.

 

Works fine in the sandbox: http://git.wescoturf.com/blog/company-news/test-absolute-path

 

Any guidance on this?

 

Thank you in advance.

 

Link to comment
Share on other sites

Thanks. I'm afraid I'm not a coder; but a designer. This is the last chunk of that file. Is there anything that stands out? {if} looks closed to me and I didn't change the file.

 

 
{if Configuration::get('PH_BLOG_FB_INIT')}
<script>
var lang_iso = '{$lang_iso}_{$lang_iso|@strtoupper}';
{literal}(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/"+lang_iso+"/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
{/literal}
</script>
{/if}
<script>
$(function() {
$('body').addClass('simpleblog simpleblog-single');
});
</script>
Link to comment
Share on other sites

hello

try to change

 

<script>

$(function() {
$('body').addClass('simpleblog simpleblog-single');
});
</script>

to
 

<script>
{literal}
$(function() {
$('body').addClass('simpleblog simpleblog-single');
});
{/literal}
</script>
Link to comment
Share on other sites

Thanks everyone. No change. Cleared cache first.

 

Don't shame me for using Dreamweaver as my code editor please. I've grown attached to it after 16 years of designing. 

 

Attached is a screenshot from my editor showing a syntax error regarding the first {/literal} closing tag.

 

??

 

post-1252187-0-47472600-1471619271_thumb.gif

Link to comment
Share on other sites

let's do the expertiment,

remove whole code:
 

{if Configuration::get('PH_BLOG_FB_INIT')}
<script>
var lang_iso = '{$lang_iso}_{$lang_iso|@strtoupper}';
{literal}(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/"+lang_iso+"/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
{/literal}
</script>
{/if}
<script>
$(function() {
$('body').addClass('simpleblog simpleblog-single');
});
</script>

does it change anything then?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...