Paulito Posted December 13, 2014 Share Posted December 13, 2014 (edited) Good morning all, Using PS 1.6.0.8 Non-Default theme I was doing a bit of copy + paste to a static module in my theme, did not like what I had done and deleted it. The next thing I get is a White Page. I have asked my host to install a back-up, which they have done but I still get the white screen. Have gone into config/defines.inc.php and set this to True, the result is: Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home/vibestor/public_html/aissia.co.uk/themes/watchstore/header.tpl" on line 84 "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){" - Unexpected "[", expected one of: "}" , " " , ATTR' in /home/vibestor/public_html/aissia.co.uk/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:667 Stack trace: #0 /home/vibestor/public_html/aissia.co.uk/tools/smarty/sysplugins/smarty_internal_templateparser.php(3144): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /home/vibestor/public_html/aissia.co.uk/tools/smarty/sysplugins/smarty_internal_templateparser.php(3209): Smarty_Internal_Templateparser->yy_syntax_error(64, '[') #2 /home/vibestor/public_html/aissia.co.uk/tools/smarty/sysplugins/smarty_internal_smartytemplatecompiler.php(105): Smarty_Internal_Templateparser->doParse(64, '[') #3 /home/vibestor/public_html/aissia.co.uk/too in /home/vibestor/public_html/aissia.co.uk/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 667 Also, looking in: Back office > Advanced Parameters > Configuration I see this: updated files (2) config/defines.inc.php js/tinymce.inc.js I have not done anything unusual, so I am not sure why this has happened. Would appreciate some help Paul Edited December 13, 2014 by Paulito (see edit history) Link to comment Share on other sites More sharing options...
razaro Posted December 13, 2014 Share Posted December 13, 2014 Check http://www.prestashop.com/forums/topic/386321-solvedfatal-error-when-updating-google-analytics-module/ think updating module would help. 1 Link to comment Share on other sites More sharing options...
Paulito Posted December 13, 2014 Author Share Posted December 13, 2014 Thanks for the reply razaro, Unfortunately that has not worked, I still have white screen Paul Link to comment Share on other sites More sharing options...
razaro Posted December 13, 2014 Share Posted December 13, 2014 OK but just to narrow it down, try to disable Google Analitics module , clear cache and try again. And check file header.tpl in modules/ganalytics/views/templates/hook ,or post it here. Link to comment Share on other sites More sharing options...
Paulito Posted December 13, 2014 Author Share Posted December 13, 2014 Hello again Have disabled module, still white screen Here is tpl file <script type="text/javascript"> {if $universal_analytics eq true} {literal} (function (i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); {/literal} ga('create', '{$ganalytics_id|escape:'htmlall':'UTF-8'}'{if isset($pageTrack)}, '{$pageTrack|escape:'htmlall':'UTF-8'}'{/if}); {if $isOrder eq true} ga('require', 'ecommerce', 'ecommerce.js'); {else} ga('send', 'pageview'); {/if} {if $isOrder eq true} ga('ecommerce:addTransaction', { 'id': '{$trans.id|escape:'htmlall':'UTF-8'}', 'affiliation': '{$trans.store|escape:'htmlall':'UTF-8'}', 'revenue': '{$trans.total|escape:'htmlall':'UTF-8'}', 'tax': '{$trans.tax|escape:'htmlall':'UTF-8'}', 'shipping': '{$trans.shipping|escape:'htmlall':'UTF-8'}', 'city': '{$trans.city|escape:'htmlall':'UTF-8'}', 'state': '{$trans.state|escape:'htmlall':'UTF-8'}', 'country': '{$trans.country|escape:'htmlall':'UTF-8'}', 'currency': '{$trans.currency|escape:'htmlall':'UTF-8'}' }); {foreach from=$items item=item} ga('ecommerce:addItem', { 'id': '{$item.OrderId|escape:'htmlall':'UTF-8'}', 'sku': '{$item.SKU|escape:'htmlall':'UTF-8'}', 'name': '{$item.Product|escape:'htmlall':'UTF-8'}', 'category': '{$item.Category|escape:'htmlall':'UTF-8'}', 'price': '{$item.Price|escape:'htmlall':'UTF-8'}', 'quantity': '{$item.Quantity|escape:'htmlall':'UTF-8'}' }); {/foreach} {literal} (function() { {/literal}{if $isOrder eq true}{literal} var key = 'ga_trans'; var idtrans = {/literal}{$trans.id|intval}{literal}; if (!!$.prototype.totalStorage) var view_ga_trans = parseInt($.totalStorage(key)); else if (typeof localStorage !== 'undefined' && localStorage) var view_ga_trans = parseInt(localStorage.getItem(key)); if (typeof view_ga_trans !== 'undefined' && view_ga_trans > 0 && idtrans == view_ga_trans ) return false; if (!!$.prototype.totalStorage) $.totalStorage(parseInt(key, idtrans)); else if (typeof localStorage !== 'undefined' && localStorage) localStorage.setItem(key, parseInt(idtrans)); {/literal}{/if}{literal} ga('ecommerce:send'); })(); {/literal} {/if} {else} var _gaq = _gaq || []; _gaq.push(['_setAccount', '{$ganalytics_id|escape:'htmlall':'UTF-8'}']); // Recommended value by Google doc and has to before the trackPageView _gaq.push(['_setSiteSpeedSampleRate', 5]); _gaq.push(['_trackPageview'{if isset($pageTrack)}, '{$pageTrack|escape:'htmlall':'UTF-8'}'{/if}]); {if $isOrder eq true} {* If it's an order we need more data for stats *} _gaq.push(['_addTrans', '{$trans.id|escape:'htmlall':'UTF-8'}', {* order ID - required *} '{$trans.store|escape:'htmlall':'UTF-8'}', {* affiliation or store name *} '{$trans.total|escape:'htmlall':'UTF-8'}', {* total - required *} '{$trans.tax|escape:'htmlall':'UTF-8'}', {* tax *} '{$trans.shipping|escape:'htmlall':'UTF-8'}', {* shipping *} '{$trans.city|escape:'htmlall':'UTF-8'}', {* city *} '{$trans.state|escape:'htmlall':'UTF-8'}', {* state or province *} '{$trans.country|escape:'htmlall':'UTF-8'}' {* country *} ]); {foreach from=$items item=item} _gaq.push(['_addItem', '{$item.OrderId|escape:'htmlall':'UTF-8'}', {* order ID - required *} '{$item.SKU|escape:'htmlall':'UTF-8'}', {* SKU/code - required *} '{$item.Product|escape:'htmlall':'UTF-8'}', {* product name *} '{$item.Category|escape:'htmlall':'UTF-8'}', {* category or variation *} '{$item.Price|escape:'htmlall':'UTF-8'}', {* unit price - required *} '{$item.Quantity|escape:'htmlall':'UTF-8'}' {* quantity - required *} ]); {/foreach} {* submits transaction to the Analytics servers *} {literal} _gaq.push(['_trackTrans']); {/literal} {/if} {literal} (function() { {/literal}{if $isOrder eq true}{literal} var key = 'ga_trans'; var idtrans = {/literal}{$trans.id|intval}{literal}; if (!!$.prototype.totalStorage) var view_ga_trans = parseInt($.totalStorage(key)); else if (typeof localStorage !== 'undefined' && localStorage) var view_ga_trans = parseInt(localStorage.getItem(key)); if (typeof view_ga_trans !== 'undefined' && view_ga_trans > 0 && idtrans == view_ga_trans ) return false; if (!!$.prototype.totalStorage) $.totalStorage(parseInt(key, idtrans)); else if (typeof localStorage !== 'undefined' && localStorage) localStorage.setItem(key, parseInt(idtrans)); {/literal}{/if}{literal} var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); {/literal} {/if} </script> Paul Link to comment Share on other sites More sharing options...
razaro Posted December 13, 2014 Share Posted December 13, 2014 File looks ok to me, but if module is disabled and still white screen try again to turn debug mode on. Maybe there is some other error now. 1 Link to comment Share on other sites More sharing options...
Paulito Posted December 13, 2014 Author Share Posted December 13, 2014 Hello again I think it's still the same Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home/vibestor/public_html/aissia.co.uk/themes/watchstore/header.tpl" on line 84 "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){" - Unexpected "[", expected one of: "}" , " " , ATTR' in /home/vibestor/public_html/aissia.co.uk/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:667 Stack trace: #0 /home/vibestor/public_html/aissia.co.uk/tools/smarty/sysplugins/smarty_internal_templateparser.php(3144): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /home/vibestor/public_html/aissia.co.uk/tools/smarty/sysplugins/smarty_internal_templateparser.php(3209): Smarty_Internal_Templateparser->yy_syntax_error(64, '[') #2 /home/vibestor/public_html/aissia.co.uk/tools/smarty/sysplugins/smarty_internal_smartytemplatecompiler.php(105): Smarty_Internal_Templateparser->doParse(64, '[') #3 /home/vibestor/public_html/aissia.co.uk/too in /home/vibestor/public_html/aissia.co.uk/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 667 Paul Link to comment Share on other sites More sharing options...
razaro Posted December 13, 2014 Share Posted December 13, 2014 Hmm check then maybe themes/watchstore/header.tpl to see if there is by any chance some Google Analytics code, which would be strange a bit. 1 Link to comment Share on other sites More sharing options...
Paulito Posted December 13, 2014 Author Share Posted December 13, 2014 Here is the header.tpl <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 " lang="{$lang_iso}"> <![endif]--> <!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 ie7" lang="{$lang_iso}"> <![endif]--> <!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="{$lang_iso}"> <![endif]--> <!--[if gt IE 8]> <html class="no-js ie9" lang="{$lang_iso}"> <![endif]--> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang_iso}"> <head> <meta name="google-site-verification" content="NGyzwGQJjjUnPkFtfsyAn6AwL_ZJ8f1kBeSqZMsrpsM" /> <meta name="p:domain_verify" content="23c7f834887b3bfb4310d6d179566ad7"/> <meta name="alexaVerifyID" content="wj2B7dQ4B4nh86Go1ROiSgFr2v8"/> <title>{$meta_title|escape:'htmlall':'UTF-8'}</title> <meta name="alexaVerifyID" content="wj2B7dQ4B4nh86Go1ROiSgFr2v8"/> {if isset($meta_description) AND $meta_description} <meta name="description" content="{$meta_description|escape:html:'UTF-8'}" /> {/if} {if isset($meta_keywords) AND $meta_keywords} <meta name="keywords" content="{$meta_keywords|escape:html:'UTF-8'}" /> {/if} <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <meta http-equiv="content-language" content="{$meta_language}" /> <meta name="generator" content="PrestaShop" /> <meta name="robots" content="{if isset($nobots)}no{/if}index,{if isset($nofollow) && $nofollow}no{/if}follow" /> <meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport"/> <link href='http://fonts.googleapis.com/css?family=Alegreya:400,700' rel='stylesheet' type='text/css'/> <link href='http://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css'/> <link rel="icon" type="image/vnd.microsoft.icon" href="{$favicon_url}?{$img_update_time}" /> <link rel="shortcut icon" type="image/x-icon" href="{$favicon_url}?{$img_update_time}" /> <script type="text/javascript"> var baseDir = '{$content_dir|addslashes}'; var baseUri = '{$base_uri|addslashes}'; var static_token = '{$static_token|addslashes}'; var token = '{$token|addslashes}'; var priceDisplayPrecision = {$priceDisplayPrecision*$currency->decimals}; var priceDisplayMethod = {$priceDisplay}; var roundMode = {$roundMode}; </script> {if isset($css_files)} {foreach from=$css_files key=css_uri item=media} <link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" /> {/foreach} {/if} {if isset($js_defer) && !$js_defer && isset($js_files) && isset($js_def)} {$js_def} {foreach from=$js_files item=js_uri} <script type="text/javascript" src="{$js_uri|escape:'html':'UTF-8'}"></script> {/foreach} {/if} <!--[if IE 7]><link href="{$css_dir}global-ie.css" rel="stylesheet" type="text/css" media="{$media}" /><![endif]--> <!--[if IE 8]><link href="{$css_dir}cshometab1-ie8.css" rel="stylesheet" type="text/css" media="{$media}" /><![endif]--> {$HOOK_HEADER} <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-562952[spam-filter]1', 'auto'); ga('send', 'pageview'); </script> <meta name="alexaVerifyID" content="wj2B7dQ4B4nh86Go1ROiSgFr2v8"/> <meta name="p:domain_verify" content="ad4206c9172b5a619ff761a1a48de846"/> <meta name="p:domain_verify" content="23c7f834887b3bfb4310d6d179566ad7"/> </head> <body {if isset($page_name)}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if} class="{if $hide_left_column}hide-left-column{/if} {if $hide_right_column}hide-right-column{/if} {if $content_only} content_only {/if}"> {if !$content_only} {if isset($restricted_country_mode) && $restricted_country_mode} <div id="restricted-country"> <p>{l s='You cannot place a new order from your country.'} <span class="bold">{$geolocation_country}</span></p> </div> {/if} <div id="page"> <!-- Header --> <div class="mode_header"> <div class="mode_header_content"> <div class="container_24"> <div id="header" class="grid_24 clearfix omega alpha"> <a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}"> <img class="logo" src="{$logo_url}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" /> </a> {$HOOK_TOP} </div> </div> </div> </div> {if isset($CS_MEGA_MENU)} <div class="mode_megamenu"> <div class="container_24"> {$CS_MEGA_MENU} </div> </div> {/if} {if $page_name == 'index'} <div class="mode_slideshow"> <div class="container_24"> {if isset($HOOK_CS_SLIDESHOW)} {$HOOK_CS_SLIDESHOW} {/if} </div> </div> {/if} <div class="mode_container"> <div class="container_24"> {if $page_name != 'index'} <!-- Breadcumb --> <!-- <script type="text/javascript"> $(document).ready(function() { if ($("#old_bc").html()) { $("#bc").html($("#old_bc").html()); $("#old_bc").hide(); } }); </script> --> {if $page_name == 'category'} <div class="cs_cat_img"> {if isset($HOOK_CATEGORY_IMAGE) && $HOOK_CATEGORY_IMAGE} {$HOOK_CATEGORY_IMAGE} {/if} </div> {/if} <div class="bc_line"> <div id="bc" class="breadcrumb"></div> {include file="$tpl_dir./breadcrumb.tpl"} </div> {/if} <div id="columns" class="{if isset($grid_column)}{$grid_column}{/if} grid_24 omega alpha"> {if $page_name != 'index'} {if isset($left_column_size) && !empty($left_column_size)} <!-- Left --> <div id="left_column" class="grid_{$left_column_size|intval} alpha"> {$HOOK_LEFT_COLUMN} </div> {/if} {/if} <!-- Center --> <div id="center_column" class="{$center_class}"> {/if} Paul Link to comment Share on other sites More sharing options...
razaro Posted December 13, 2014 Share Posted December 13, 2014 Yeah, you have <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-562952[spam-filter]1', 'auto'); ga('send', 'pageview'); </script> there , delete it , or made backup in some file, and try then. If all works use default module and check if that "UA-562952[spam-filter]1" is yours. 1 Link to comment Share on other sites More sharing options...
Paulito Posted December 13, 2014 Author Share Posted December 13, 2014 Hello razaro That fixed it. I owe you a lot of Drinks. But I still do not understand how this script got there, I have not done any coding for weeks Paul Link to comment Share on other sites More sharing options...
razaro Posted December 13, 2014 Share Posted December 13, 2014 Great, glad to hear that. Yeah it is strange, if it is paid theme check files you first downloaded, if it was there all along. It should not because it probably cause same error. And that Id "UA-562952[spam-filter]1" is it yours ? Link to comment Share on other sites More sharing options...
Paulito Posted December 13, 2014 Author Share Posted December 13, 2014 Yeah, really odd because everything was OK yesterday. I haven't checked the ownership of the ID yet but will do so soonest. Anyway, thanks so much for your help, I really appreciate it. Paul Link to comment Share on other sites More sharing options...
Recommended Posts