Jump to content

Fatal Error: Uncaught --> Smarty Compiler: Syntax Error


Recommended Posts

Hey there! I'm quite confused. I got this error message:

 

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/themes/default-bootstrap/product-list.tpl" on line 213 "{/foreach}" unknown tag "foreachclose" <-- thrown in /tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 213

 

Here is the content of the "product-list.tpl". I can't remember that I'd change anything in it. 

 

https://codeshare.io/xvQNU

 

I got the error when I tried to open the "live-edit" version of the website. 

 

Edit: Depending on, if I enable "force compilation" the error message changes:

 

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/themes/default-bootstrap/product-list.tpl" on line 213 "{/foreach}" unclosed {if} tag <-- thrown in /tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 213

Edited by Apury (see edit history)
Link to comment
Share on other sites

As I can see, there are 3 missing lines in your file.

 

After

    {math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}

add

    <!-- Products list -->
    <ul{if isset($id) && $id} id="{$id}"{/if} class="product_list grid row{if isset($class) && $class} {$class}{/if}">
    {foreach from=$products item=product name=products}
  • Like 1
Link to comment
Share on other sites

 

As I can see, there are 3 missing lines in your file.

 

After

    {math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}

add

    <!-- Products list -->
    <ul{if isset($id) && $id} id="{$id}"{/if} class="product_list grid row{if isset($class) && $class} {$class}{/if}">
    {foreach from=$products item=product name=products}

 

Thanks a lot sir. Seems like keeping some working backups of such files is a must. However, I still can't figure out why those lines went missing. o.o

Edited by Apury (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...