| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Smarty Error: Syntax ? | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Smarty Error: Syntax ?
I'm hoping someone might be able to point me in the right direction:
I have a JS menu that I'm including via external calls and 2 inline functions in /customer/home.tpl (snippet below). What I'm seeing is this smarty error: "Error: Smarty error: [in customer/home.tpl line 24]: syntax error: unrecognized tag 'x' (Smarty_Compiler.class.php, line 590) in /var/www/vhosts/********path-to-install/httpdocs/dsbg/include/lib/smarty/Smarty.class.php on line 1093" The menu appears and operates correctly on the first page load but the error is displayed. Upon a refresh, the error goes away and the menu stops behaving in a normal manner. Wondering if anyone might be able to point me in the right direction. Code:
__________________
X-Cart DB Version: 4.3.0 GOLD Gift Registry |
|||||||
#2
|
|||||||
|
|||||||
Re: Smarty Error: Syntax ?
It should be {literal} not <literal>
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
Re: Smarty Error: Syntax ?
Thanks Padraic. I gave that a try too and while the error goes away, it renders the menu non functional.
I actually took out that inline function block so it's now only <code> <script type="text/javascript" src="skin1/browserInfo.js"></script> <script type="text/javascript" src="skin1/dsbgmenu_var.js"></script> <script type="text/javascript" src="skin1/menu_com.js"></script> <noscript>Your browser does not support script</noscript> </code> When not included in a smarty template, the menu renders as it should. As soon as I include it in the template, it breaks. I'm guessing that my problem may have more to do with conflicting JS instead of a parsing error.
__________________
X-Cart DB Version: 4.3.0 GOLD Gift Registry |
|||||||
#4
|
|||||||
|
|||||||
Re: Smarty Error: Syntax ?
Can anyone recommend a tool that will pull in a list of all JS functions (on page and external calls) that are in use when a page loads? I was thinking firebug did this but it clearly does not.
__________________
X-Cart DB Version: 4.3.0 GOLD Gift Registry |
|||||||
#5
|
|||||||
|
|||||||
Re: Smarty Error: Syntax ?
You need to put literal tags around the external js file code as well.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#6
|
|||||||
|
|||||||
Re: Smarty Error: Syntax ?
Hi Padraic,
I've reduced it to this: {literal} <script type="text/javascript" src="skin1/browserInfo.js"></script> <script type="text/javascript" src="skin1/dsbgmenu_var.js"></script> <script type="text/javascript" src="skin1/menu_com.js"></script> {/literal} and still no success. I get no parse error but the menu is compressed and jammed into the upper left corner in a small pile.
__________________
X-Cart DB Version: 4.3.0 GOLD Gift Registry |
|||||||
|
|||
X-Cart forums © 2001-2020
|