1
I installed a theme using the module: export/import Theme, as shown in this video : and now I’m getting this message in the header:
Fatal error: Uncaught Exception 'Smartycompilerexception' with message 'Syntax Error in template "/var/www/html/myproject/themes/food-store/header.tpl" online 87 "<Nav>{hook h="displayNav"}</Nav>" Unknown tag "hook"' in /var/www/html/myproject/tools/Smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 431
Does anyone have any idea what that mistake might be?
This is the line that is giving error (87):
<div class="header-container">
<header id="header">
<div class="banner">
<div class="container">
<div class="row">
{hook h="displayBanner"}
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="row">
<nav>{hook h="displayNav"}</nav>
</div>
</div>
</div>
<div>
<div class="container">
<div class="row">
<div id="header_logo">
<a href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
<img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if $logo_image_width} width="{$logo_image_width}"{/if}{if $logo_image_height} height="{$logo_image_height}"{/if}/>
</a>
</div>
{if isset($HOOK_TOP)}{$HOOK_TOP}{/if}
</div>
</div>
</div>
</header>
In that part...
{hook h="displayBanner"}
Looks like the version you’re compiling is Smarty 3:
@link http://www.smarty.net/
* @copyright 2008 New Digital Group, Inc.
* @author Monte Ohrt <monte at ohrt dot com>
* @author Uwe Tews
* @package Smarty
* @version 3.0.7
Maybe it solves,
{' '|implode:$body_classes}
– rray
this first error solved!
– Ivan Ferrer
Now the error has changed line...:( -> I will edit the question...
– Ivan Ferrer
Do you realize what this
hook
does? it generates some style? which version of Smarty is?– rray
I believe it is version 2.0. This hook should be like a include, I think.
– Ivan Ferrer
In Smarty 2 you have can not have a tag
<style>
in the template need to escape with{style} css {/style}
, try to involve the{hook}
with the{style}
– rray
I tried so:
{style}{hook h="displayBanner"}{/style}
, and it didn’t work.– Ivan Ferrer
New themes, such as modules, usually do not support a version as old as 1.4.. At least it should be in 1.5. Recommended is to always be in the latest version. If you can, migrate to the current version 1.6.1.3
– Daniel Omine
That’s right, the purchased theme was not made for lower versions, the problem is that we do not want to upgrade to the new version, as we would have to train the staff to use the new admin platform, is out of the question. I even took a test installing the theme in a recent version 1.6.1.2 and it applied the theme without giving any error but I have to adapt it to an older version so I’m doing it in steps...
– Ivan Ferrer