van_the_man Posted February 14, 2014 Share Posted February 14, 2014 Hi, I have just upgraded to version 5.2.8 today and now I cannot access my storefront (at: www.begeesonline.co.uk), but I am able to login to admin. The webpage simply does not display! Could anyone advise on how to resolve? Regards, van_the_man Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 14, 2014 Share Posted February 14, 2014 Hello, When I visit your site, I get web server headers, but no actual content. And I get the favicon (auto-requested by my browser). I get a PHP session cookie valid for one hour (standard for CubeCart), and the P3P policy string. Therefore, there is enough of CubeCart that is getting woken up properly. I am going to suggest that you get to admin, Maintenance, Rebuild tab, and clear the cache. (You didn't mention if you had already done that.) I also see in the web server headers that (perhaps) your hosting account has a Squid Proxy Server and that when I request the page, the header says MISS from localhost:3128. (I hope that's not my local proxy server in my network.) But I can't say if having upgraded the CubeCart app will cause problems with regard to Squid. I would ask that you find a means of having PHP log errors to a log file. If Smarty (the template rendering engine) complains about a syntax error in a template, the error log may be the only place where you will catch it. Quote Link to comment Share on other sites More sharing options...
van_the_man Posted February 14, 2014 Author Share Posted February 14, 2014 Hi bsmither! It turns out it was a problem with a facebook activity feed added to the homepage document. I have added the error recorded in the 'System Error Log' tab from the admin site below (for reference): /includes/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:78 - Syntax error in template "967eb914e61cc5853655d3e0f65a0570f93f709a" on line 78 "var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}" - Unexpected ";", expected one of: "}" All sorted now, but nevertheless thanks for your quick response! Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 14, 2014 Share Posted February 14, 2014 Specifically, Smarty reserves for itself all contents contained within braces without whitespace. So, {return;} will be claimed and parsed by Smarty (and will report a syntax error), while { return; } will be left alone for the javascript to have. The whitespace can be a space, tab, new line, etc. If fixing all the javascript to have whitespace in braces is not practical, Smarty gives you this: {literal} Whatever javascript you have; {/literal} Quote Link to comment Share on other sites More sharing options...
ian_tttt Posted February 14, 2014 Share Posted February 14, 2014 How did you fix this? I have upgraded from version 5.2.7 to latest 5.2.8 and have same issue blank store but admin is fully working. Please share the fix. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted February 14, 2014 Share Posted February 14, 2014 As I understand it, van did share the fix that worked for him. He found an error log message that led him to believe it was a set of code he had added to main.php. Then Bsmither offered a way to fix the code, rather than take it off. SO if you are experiencing this, the place to start should be your error logs. Quote Link to comment Share on other sites More sharing options...
ian_tttt Posted February 14, 2014 Share Posted February 14, 2014 I don't fully understand the working of smarty/code so I don't understand Bsmitter reply/fix . I get the following error each time I refresh the homepage in the system error log in the admin:- [Exception] /var/www/web/includes/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:6 - Syntax error in template "100b2ac4751acdf412736e8623b59ddb071e6466" on line 6 ".style2 {color: #000000}" - Unexpected ": ", expected one of: "}" I have looked in includeslibsmartysyspluginssmarty_internal_templatecompilerbase.php at line 6 and its a commented out line with the following " * This file contains the basic classes and methodes for compiling Smarty templates with lexer/parser " I have tried overwriting the contents of the smarty folder includes/lib/smarty/ with the contents of the old 5.2.7 still no joy. This is a upgrade of 5.2.8 over a freah install 5.2.7 no mods code changes have been made. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 14, 2014 Share Posted February 14, 2014 Welcome ian_tttt! Glad to see you made it to the forums. Please look in the folder /cache/skin/. In there you find a lot of files with nonsensical names. One will be: 100b2ac4751acdf412736e8623b59ddb071e6466.file.template_name.php where template_name could be main.php. Using template_name as a clue (for example, main.php), open the actual skin template file for editing (/skins/ACTIVE_SKIN/templates/main.php). Find the statement that has this: .style2 {color: #000000} As discussed above, Smarty will claim for itself anything in braces without whitespace. The statement above has color: #000000 within braces with no whitespace separating the contents within the braces, and the braces. To fix this, make the statement look like: .style2 { color: #000000; } Notice the space between the opening and closing braces and the contents within the braces. FYI: Yes -- Smarty logs the error, mentioning its own system file that got confused about the bad template. So, this is a case of a bad data file causing a problem elsewhere - a 'red herring' if that means anything to you. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 15, 2014 Share Posted February 15, 2014 The problem may be in the code that makes up your HomePage Document. Please see:>Blank Screens After Upgrade to CC528? Quote Link to comment Share on other sites More sharing options...
ian_tttt Posted February 15, 2014 Share Posted February 15, 2014 Thanks bsmither for the link, it must be that that caused the problem as in my home document I do have CSS which I guess what was on the error, I could not find any .style2 in the skin tempaltes/cache In my home page i have CSS:- .style2 {color: #000000} a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } .style3 { color: #FFFFFF; font-weight: bold; } unfortunately I threw the towel in to early last night and reinstalled a fresh 5.2.8 dumping the database (just on a test environment, not live) but not yet added the homepage code. I will go through the home page code over the weekend adding the white spaces and guess I will only know if it work when I upgrade again. thanks for your help time and effort, Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted February 17, 2014 Share Posted February 17, 2014 Hmmmm so the new code we added to allow smarty code clearly has issues in some circumstances! Maybe we should remove the parsing or add some clever parsing to escape with "literal" blocks. Im sorry you felt the need to reinstall. Our support staff could have resolved this for you without having to restart although our office is closed over the weekend. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.