phpsmartysmarty3smarty2smarty-plugins

Upgrade from smarty 2 to 3 Unexpected "|"


I am sorting out issues in a smarty upgrade from 2 to 3 and I am getting this error and I can't figure out why:

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template {$item.content_group_name | htmlspecialchars} - Unexpected "|"

Anyone have any experience with this issue?


Solution

  • Smarty 3 fails with that error if there is white space around the | character when declaring a modifier. Change your tag to

    {$item.content_group_name|htmlspecialchars}