Jump to content

[SOLVED] Is it normal to have products page not work during force compile?


Recommended Posts

This is the error i got

Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home/youneyme/public_html/themes/presta077v147/modules/productscategory/productscategory.tpl" on line 33 "{$categoryProducts = $categoryProducts + 2;}" - Unexpected ";"' in /home/youneyme/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:431 Stack trace: #0 /home/youneyme/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(2855): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /home/youneyme/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(2920): Smarty_Internal_Templateparser->yy_syntax_error(24, ';') #2 /home/youneyme/public_html/tools/smarty/sysplugins/smarty_internal_smartytemplatecompiler.php(51): Smarty_Internal_Templateparser->doParse(24, ';') #3 /home/youneyme/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(82): Smarty_Internal_SmartyTemplateCompiler->doCompile('{*?* 2007-2011 ...') #4 /home/youneyme/p in /home/youneyme/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 431

 

 

i never added that ';' , but i decided to remove it anyway and i get a different error

 

Fatal error: Unsupported operand types in /home/youneyme/public_html/tools/smarty/compile/f6d73cee6b908028cc1aa02289fa5c51afe4a0fe.file.productscategory.tpl.php on line 33

 

 

if this helps i was previously messing with productscategory.php and the only thing i did was change the numbers 30 and 15 in the following code, (i obviously changed them back, yet same problem is still there)

 

anyway thats the code i was changing (productscategory.php)

if ($sizeOfCategoryProducts > 30)
{
$categoryProducts = array_slice($categoryProducts, $middlePosition - 15, 30, true);
$middlePosition = 15;
}

 

 

EDIT: And now i get an error when force compile is disabled

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

First of all, if you want to get your site back up, disable the module.

 

You can edit home/youneyme/public_html/tools/smarty/compile/f6d73cee6b908028cc1aa02289fa5c51afe4a0fe.file.productscategory.tpl.php and see what's in line #33

Link to comment
Share on other sites

Ok this is how i fixed it. i had to uninstall the module, then delete productscategory.tpl inside the themes/modules/productscategory/ clear cache then install the module and put back productscategory.tpl (the one that comes with your theme)

 

 

thanks for your help.

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

×
×
  • Create New...