RobV Posted December 30, 2010 Share Posted December 30, 2010 Hello all,I've got some problems with a 1.3 module (horizontal navigation bar), but I have no clue how to make it 1.4 compatible.I installed beta 2 today after using 1.4.02 (alpha) without problems and I get this error when trying to access the website: FATAL ERROR: UNCAUGHT EXCEPTION 'SMARTYCOMPILEREXCEPTION' WITH MESSAGE 'SYNTAX ERROR IN TEMPLATE "/HOME2/ARCUNIAC/PUBLIC_HTML/MODULES/CATEGORIESBAR/CATEGORY-BAR-LEVEL.TPL" ON LINE 8 " {INCLUDE FILE=$TPL_DIR./CATEGORY-TREE-BRANCH.TPL NODE=$CHILD LAST='TRUE'}" - UNEXPECTED "/", EXPECTED ONE OF: "{" , "$" , "IDENTIFIER" , INTEGER' IN /HOME2/ARCUNIAC/PUBLIC_HTML/TOOLS/SMARTY/SYSPLUGINS/SMARTY_INTERNAL_TEMPLATECOMPILERBASE.PHP:423 STACK TRACE: #0 /HOME2/ARCUNIAC/PUBLIC_HTML/TOOLS/SMARTY/SYSPLUGINS/SMARTY_INTERNAL_TEMPLATEPARSER.PHP(2802): SMARTY_INTERNAL_TEMPLATECOMPILERBASE->TRIGGER_TEMPLATE_ERROR() #1 /HOME2/ARCUNIAC/PUBLIC_HTML/TOOLS/SMARTY/SYSPLUGINS/SMARTY_INTERNAL_TEMPLATEPARSER.PHP(2867): SMARTY_INTERNAL_TEMPLATEPARSER->YY_SYNTAX_ERROR(35, '/') #2 /HOME2/ARCUNIAC/PUBLIC_HTML/TOOLS/SMARTY/SYSPLUGINS/SMARTY_INTERNAL_SMARTYTEMPLATECOMPILER.PHP(51): SMARTY_INTERNAL_TEMPLATEPARSER->DOPARSE(35, '/') #3 /HOME2/ARCUNIAC/PUBLIC_HTML/TOOLS/SMARTY/SYSPLUGINS/SMARTY_INTERNAL_TEMPLATECOMPILERBASE.PHP(82): SMARTY_INTERNA IN /HOME2/ARCUNIAC/PUBLIC_HTML/TOOLS/SMARTY/SYSPLUGINS/SMARTY_INTERNAL_TEMPLATECOMPILERBASE.PHP ON LINE 423Probably a compatibility problem, does anyone know how to solve it?Thanks!Rob Link to comment Share on other sites More sharing options...
rocky Posted December 31, 2010 Share Posted December 31, 2010 It's because Smarty 3 is more strict with the syntax. You must use variable="value" not variable=value to avoid the error. Link to comment Share on other sites More sharing options...
RobV Posted December 31, 2010 Author Share Posted December 31, 2010 so if I have this: {$node.name|escape:htmlall:'UTF-8'} {if $node.children|@count > 0} {foreach from=$node.children item=child name=categoriesLevel} {if $smarty.foreach.categoriesLevel.last} {include file=$tpl_dir./category-tree-branch.tpl node=$child last='true'} {else} {include file=$tpl_dir./category-tree-branch.tpl node=$child last='false'} {/if} {/foreach} {/if} it should read include file="......" ?Sorry bit of a newbie Thanks! Link to comment Share on other sites More sharing options...
rocky Posted December 31, 2010 Share Posted December 31, 2010 You should change it to: {$node.name|escape:htmlall:'UTF-8'} {if $node.children|@count > 0} {foreach from=$node.children item=child name=categoriesLevel} {if $smarty.foreach.categoriesLevel.last} {include file="$tpl_dir./category-tree-branch.tpl" node=$child last='true'} {else} {include file="$tpl_dir./category-tree-branch.tpl" node=$child last='false'} {/if} {/foreach} {/if} Link to comment Share on other sites More sharing options...
RobV Posted December 31, 2010 Author Share Posted December 31, 2010 Thanks! it does resolve the error but now the whole website turns blank when I put it on smarty3:http://www.arcunia.com/index.phpSo does this mean I need to try to rewrite the whole template? Link to comment Share on other sites More sharing options...
rocky Posted December 31, 2010 Share Posted December 31, 2010 Yes. You can edit config/config.inc.php and temporarily change 'display_errors' from 'off' to 'on' to get an error message instead of a blank page. That will help you find all the places that need to be changed. Link to comment Share on other sites More sharing options...
RobV Posted December 31, 2010 Author Share Posted December 31, 2010 That is already activated but no errors. I see the menu text sometimes that is all Link to comment Share on other sites More sharing options...
RobV Posted December 31, 2010 Author Share Posted December 31, 2010 Oh problem solved!! forgot to change the file in the template folder too Thanks for your great help and happy new year!!! Link to comment Share on other sites More sharing options...
RobV Posted December 31, 2010 Author Share Posted December 31, 2010 Could you help me with one more thing? Now making changes to the tpl files to make it compatible. But I get: Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home2/arcuniac/public_html/themes/clean-simple/./product-sort.tpl" on line 15 " <option value="{$link->addSortDetails($request, 'position', 'desc')|escape:'htmlall':'UTF-8'}" {if $orderby eq 'position' AND $orderway eq 'DESC' }selected="selected"{/if}>{l s='--'}</option>" - Unexpected " }", expected one of: "|" , "}" , " " , "*" , "/" , "%" , "+" , "-" , ""&"" , ISIN , ISDIVBY , ISNOTDIVBY , ISEVEN , ISNOTEVEN , ISEVENBY , ISNOTEVENBY , ISODD , ISNOTODD , ISODDBY , ISNOTODDBY , "==" , "!=" , "(>,gt)" , "(<,lt)" , "(>=,ge)" , "(<=,le)" , "===" , "!==" , "(%,mod)" , "(&&,and)" , "(||,or)" , "xor"' in /home2/arcuniac/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:423 Stack trace: #0 /home2/arcuniac/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(2802): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /home2/arcuniac/p in /home2/arcuniac/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 423 On this (how it was for old presta): {l s='--'} {l s='price: lowest first'} {l s='price: highest first'} {l s='name: A to Z'} {l s='name: Z to A'} {l s='in-stock first'} Link to comment Share on other sites More sharing options...
rocky Posted December 31, 2010 Share Posted December 31, 2010 From the error, it seems you have a: Link to comment Share on other sites More sharing options...
RobV Posted December 31, 2010 Author Share Posted December 31, 2010 both are the same.... Link to comment Share on other sites More sharing options...
rocky Posted December 31, 2010 Share Posted December 31, 2010 The forums keep changing my code. The first one should be & q u o t ; without spaces at the end. You should change it to the symbol instead of the code. Link to comment Share on other sites More sharing options...
RobV Posted December 31, 2010 Author Share Posted December 31, 2010 but it is if I understand you correctly... see attached file product-sort.zip Link to comment Share on other sites More sharing options...
rocky Posted December 31, 2010 Share Posted December 31, 2010 Try this one. product-sort.zip Link to comment Share on other sites More sharing options...
RobV Posted December 31, 2010 Author Share Posted December 31, 2010 nope still: Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home2/arcuniac/public_html/themes/clean-simple/./product-sort.tpl" on line 15 " <option value="{$link->addSortDetails($request, 'position', 'desc')|escape:'htmlall':'UTF-8'}" {if $orderby eq 'position' AND $orderway eq 'DESC' }selected="selected"{/if}>{l s='--'}</option>" - Unexpected " }", expected one of: "|" , "}" , " " , "*" , "/" , "%" , "+" , "-" , ""&"" , ISIN , ISDIVBY , ISNOTDIVBY , ISEVEN , ISNOTEVEN , ISEVENBY , ISNOTEVENBY , ISODD , ISNOTODD , ISODDBY , ISNOTODDBY , "==" , "!=" , "(>,gt)" , "(<,lt)" , "(>=,ge)" , "(<=,le)" , "===" , "!==" , "(%,mod)" , "(&&,and)" , "(||,or)" , "xor"' in /home2/arcuniac/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:423 Stack trace: #0 /home2/arcuniac/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(2802): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /home2/arcuniac/p in /home2/arcuniac/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 423 Link to comment Share on other sites More sharing options...
RobV Posted December 31, 2010 Author Share Posted December 31, 2010 I also can't spot what you changed exactly Link to comment Share on other sites More sharing options...
rocky Posted December 31, 2010 Share Posted December 31, 2010 I fixed the line breaks. All the tags weren't code highlighted properly until I fixed them. I can't see anything wrong with the code. Try copying product-sort.tpl from the default PrestaShop v1.4 theme. Link to comment Share on other sites More sharing options...
RobV Posted December 31, 2010 Author Share Posted December 31, 2010 That did the trick! Now again another error at product page (solved most by now): Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home2/arcuniac/public_html/themes/clean-simple/product.tpl" on line 115 " {assign var=imageIds value=`$product->id`-`$image.id_image`}" - Unexpected "`", expected one of: "{" , "$" , "identifier" , LDELIF , LDELFOR , LDELFOREACH , SMARTYBLOCKCHILD , "closing tag" , INTEGER , "+" , "-" , "(" , "(!,not)" , TYPECAST , HEX , "." , SINGLEQUOTESTRING , "#" , "[" , """' in /home2/arcuniac/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:423 Stack trace: #0 /home2/arcuniac/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(2802): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /home2/arcuniac/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(2867): Smarty_Internal_Templateparser->yy_syntax_error(76, '`') #2 /home2/arcuniac/public_html/tools/smarty/sysplugins/smarty_internal_smartytemplatecompiler.php(51): Smarty_Internal_Templateparser->do in /home2/arcuniac/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 423 Link to comment Share on other sites More sharing options...
rocky Posted December 31, 2010 Share Posted December 31, 2010 I think you should compare all your theme files to the default PrestaShop v1.4 theme and copy any code that is generating an error. Link to comment Share on other sites More sharing options...
RobV Posted December 31, 2010 Author Share Posted December 31, 2010 Everything is working good so far! thanks for all the help and once again Happy 2011! Link to comment Share on other sites More sharing options...
Truemedia Posted January 1, 2011 Share Posted January 1, 2011 Im gunna try my paid module on 1.4 soon but its not as complicated as julian brexxs (second name probably wrong) module and i hopefully dont have to change much to make my module 1.4 compatable. If your really stuck I can give you something that will work on 1.4 when ive made the changes myself. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now