Jump to content

Upgraded to 6.0.2 but now website is white page


vidmarc
 Share

Recommended Posts

When putting javascript in a template, it is necessary to make sure the braces in the javascript code do not look like Smarty tag delimiters.

 

javascript: if(expression){do something}

Smarty: {$do_something}

 

Two ways to make sure the braces in javascript are not interpreted by Smarty (which would otherwise cause Smarty to complain about the template and then deliver a blank page to the browser):

1. Add white space (new lines, tabs, spaces, etc):

if(expression){

  do something

}

 

or 2. Enclose the javascript in Smarty's {literal}{/literal} tags:

{literal}if(expression){do something}{/literal}

Link to comment
Share on other sites

When putting javascript in a template, it is necessary to make sure the braces in the javascript code do not look like Smarty tag delimiters.

This case wasnt adding to a template directly but via the copyright notice although the same requirement to escape using smarty {literal} tags still applies. This was solved as noted via an internal support ticket

Ian

Link to comment
Share on other sites

Via the Copyright Notice?

 

Relating to the content entered into the rich text editor in admin, Store Settings, Copyright tab?

 

In GUI->__construct(), there is:

$copyright = $GLOBALS['smarty']->fetch('string:'.stripslashes($GLOBALS['config']->get('config', 'store_copyright')));

So, since the copyright content does go through the Smarty parser, it is important to keep the aforementioned javascript coding style in mind.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...