Jump to content

How to make a module 1.4 compatible?


RobV

Recommended Posts

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 423
Probably a compatibility problem, does anyone know how to solve it?

Thanks!

Rob

Link to comment
Share on other sites

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

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

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

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

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

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

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...