robynd Posted August 19, 2016 Share Posted August 19, 2016 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 More sharing options...
Mohamadou Ndiaye Posted August 19, 2016 Share Posted August 19, 2016 Hi, The problem is not the smarty but this file single.tpl. There is a unclosed tag. Look at the line 189 may you'll find the issue. Link to comment Share on other sites More sharing options...
robynd Posted August 19, 2016 Author Share Posted August 19, 2016 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 More sharing options...
robynd Posted August 19, 2016 Author Share Posted August 19, 2016 Line 189 changes depending on what editor I use. Link to comment Share on other sites More sharing options...
vekia Posted August 19, 2016 Share Posted August 19, 2016 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 More sharing options...
Mohamadou Ndiaye Posted August 19, 2016 Share Posted August 19, 2016 hello try to change to <script> {literal} $(function() { $('body').addClass('simpleblog simpleblog-single'); }); {/literal} </script> Try the suggestion of vekia may be it will help you Link to comment Share on other sites More sharing options...
robynd Posted August 19, 2016 Author Share Posted August 19, 2016 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. ?? Link to comment Share on other sites More sharing options...
robynd Posted August 19, 2016 Author Share Posted August 19, 2016 (edited) It's strange that this same file is on my sandbox git.wescoturf.com and working fine. It worked fine on my live site until I played with the media server. :-/ I really appreciate the help. Edited August 19, 2016 by robynd (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 19, 2016 Share Posted August 19, 2016 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 More sharing options...
robynd Posted August 19, 2016 Author Share Posted August 19, 2016 Removed that chunk. Saved. Uploaded. Cleared Cache. No change. It's got to be something else. And, the original code is working on git.wescoturf.com. Link to comment Share on other sites More sharing options...
Mohamadou Ndiaye Posted August 19, 2016 Share Posted August 19, 2016 If you are using CDN it coul take time before the change appear on your web site. Link to comment Share on other sites More sharing options...
robynd Posted August 19, 2016 Author Share Posted August 19, 2016 Thanks for helping with this. The module developer found the code issue and has fixed it. I really appreciate your time taking a look. cheers! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now