bsmither Posted February 14, 2014 Share Posted February 14, 2014 Warning: CubeCart 5.2.8 adds the ability to have Smarty statements in the HomePage Document. If your HomePage Document contains CSS or javascript statements, those statements may be using braces that do not have whitespace next to them. For example: h2.bold {font-weight:bold;} if (expression) {do_some_function;} Smarty will claim for itself and attempt to parse any content contained in braces that does not have whitespace between the brace and the contents. There are two fixes - choose one: Remove that ability Manually work through the HomePage Document (admin, Documents, any document marked as Homepage) making the changes to the code in Source mode (hopefully, the rich text editor will not try to compress the HTML so that the whitespaces are removed). In the file /classes/cubecart.class.php, near line 86, find:'content' => $GLOBALS['smarty']->fetch('string:'.$home['doc_content']) Make it look like:'content' => $home['doc_content'] When you have CubeCart open a document for editing, the Content tab has a rich text editor. The upper-left corner has a "Source" button. Click it. Viewing the raw HTML of the document, work your way through looking for braces -- intentional or not (that is, braces grouping CSS property statements or simply using {braces} in paragraphs). These braces must be fixed. h2.bold { font-weight:bold; } Simply using {literal}{braces}{/literal} in paragraphs. or Simply using { braces } in paragraphs. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted February 17, 2014 Share Posted February 17, 2014 Pinned. Thanks Brian! Quote Link to comment Share on other sites More sharing options...
clamor Posted March 7, 2014 Share Posted March 7, 2014 My website has crashed due to the issue outlined below. This happened 24 hours ago when I upgraded to 5.2.8 due to the admin console alerting me that I needed to do so. I submitted a support ticket and waited for a response on UK time (I am in Australia). The response when it finally arrived advised me to read this post and follow the instructions to recode my homepage!!! I am not a professional coder and this issue was clearly caused by the CubeCart upgrade. Upgrades should be fully tested before they are released. If support is not to be provided, what can I do now? Should I reinstall the previous back-up and ignore all future upgrades? I am feeling quite upset about this as I read the above warning too late. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted March 7, 2014 Share Posted March 7, 2014 Upgrades should be fully tested before they are released. Thats not relevant. CubeCart 5.2.8 no longer works with Zend. Please see: '?do=embed' frameborder='0' data-embedContent>> We will get this fixed up for you so long as your hosting is compatible. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted March 7, 2014 Share Posted March 7, 2014 This is a shame as the fetch function brings a lot of new functionality. It looks like it is going to cause more problems than the functionality. This has been removed from 5.2.9. Sorry for any inconvenience caused. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 7, 2014 Author Share Posted March 7, 2014 Maybe during the testing phase of upgrade (or right at the start), the Homepage doc can be examined and if found to contain braces, wrap {literal}{/literal} around the entirety of the doc_content and save. Then throw up a nice, big, fat warning about this new feature, giving a link that takes the admin to the document loaded into the editor. --OR-- Also, below the editor, add (in all stock languages) instruction that says, for example: The document's content can contain Smarty markup. This gives programmatic control over the document's content and layout. Please review the Smarty documentation at xyz. Then, and this is important, in the loadDocument function (or displayHomePage), pre-set Smarty's delimiters to something strange, and post-set them back to normal. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 7, 2014 Share Posted March 7, 2014 I don't know that I would ever need the fetch capability, but if it's as useful as Al says, I hope BSmither's suggestion, or something similar, can be implemented. It's a shame to go backwards IMHO. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted March 7, 2014 Share Posted March 7, 2014 Well I think this kind of functionality is for 5%. Anyone wanting to do this will know what they are wanting to do. As a result maybe all defult to not being parsed by Smarty unless the document is flagged in some way. Parse this with Smarty: Yes/No (Default) A help link can educate what Smarty is and the benefits. This opens a whole chest of cool features. Say for example you wanted a different homepage content for different visitors based on their customer group or location? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 7, 2014 Share Posted March 7, 2014 A help link can educate what Smarty is and the benefits. This opens a whole chest of cool features. Say for example you wanted a different homepage content for different visitors based on their customer group or location? Perhaps a tutorial with examples of what Smarty can do would change that 5% to much higher. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 7, 2014 Author Share Posted March 7, 2014 Hehehehe! Quote Link to comment Share on other sites More sharing options...
clamor Posted March 8, 2014 Share Posted March 8, 2014 Hi All My shopping cart is now working again thanks to support from the CubeCart team. Many thanks! Quote Link to comment Share on other sites More sharing options...
quantument Posted March 14, 2014 Share Posted March 14, 2014 I've just upgraded to the latest version of Cuebcart and the store was working fine last night, but this morning I have the following error "[Exception] /home/sites/quantumenterprises.co.uk/public_html/includes/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:22 - Syntax error in template "0b34c2761c44d1cb45bc48be860e99ec6b82b53e" on line 22 "Quantum Enterprises, 4 The Old School House, Lower Sea Lane, Charmouth, Dorset, DT6 6LJ. UK | Tel. +44 (0)1823 729 401+44 (0)1823 729 401" - Unexpected ":", expected one of: "}" and blank front end pages. The back end is fine. There are no braces or script code in the main document and I have tried different skins. Any ideas? I need to get my store back up and running! Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted March 14, 2014 Share Posted March 14, 2014 All the best people live in a house called "The Old School House" Please can you open the classes/cubecart.class.php and find at about line 86: 'content' => $GLOBALS['smarty']->fetch('string:'.$home['doc_content']) Replace with: 'content' => $home['doc_content'] Quote Link to comment Share on other sites More sharing options...
quantument Posted March 14, 2014 Share Posted March 14, 2014 I've sorted it out thanks. I'd inadvertantly copied some Skype code into the Copyright box. Removing that solved the problem. 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.